Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1202872

[PATCH v2 2/4] KVM: arm/arm64: check power_off in kvm_arch_vcpu_runnable

From Eric Auger <eric.auger@linaro.org>
Newsgroups linux.kernel
Subject [PATCH v2 2/4] KVM: arm/arm64: check power_off in kvm_arch_vcpu_runnable
Date 2015-08-07 18:20 +0200
Message-ID <pUSxd-4FO-39@gated-at.bofh.it> (permalink)
References <pUSnw-4uf-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


kvm_arch_vcpu_runnable now also checks whether the power_off
flag is set.

Signed-off-by: Eric Auger <eric.auger@linaro.org>
---
 arch/arm/kvm/arm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
index 3ac6b4c..4f50be3 100644
--- a/arch/arm/kvm/arm.c
+++ b/arch/arm/kvm/arm.c
@@ -347,7 +347,8 @@ int kvm_arch_vcpu_ioctl_set_mpstate(struct kvm_vcpu *vcpu,
  */
 int kvm_arch_vcpu_runnable(struct kvm_vcpu *v)
 {
-	return !!v->arch.irq_lines || kvm_vgic_vcpu_pending_irq(v);
+	return ((!!v->arch.irq_lines || kvm_vgic_vcpu_pending_irq(v))
+		&& !v->arch.power_off);
 }
 
 /* Just ensure a guest exit from a particular CPU */
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/4] KVM: arm/arm64: guest synchronous halt/resume Eric Auger <eric.auger@linaro.org> - 2015-08-07 18:10 +0200
  [PATCH v2 2/4] KVM: arm/arm64: check power_off in kvm_arch_vcpu_runnable Eric Auger <eric.auger@linaro.org> - 2015-08-07 18:20 +0200
  [PATCH v2 1/4] KVM: arm/arm64: rename pause into power_off Eric Auger <eric.auger@linaro.org> - 2015-08-07 18:20 +0200

csiph-web