From: Eric Auger Date: Fri, 25 Sep 2015 21:41:15 +0000 (+0200) Subject: KVM: arm/arm64: check power_off in kvm_arch_vcpu_runnable X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4f5f1dc03606e18986b874f899cf86b0a3e4f2a5;p=linux-beck.git KVM: arm/arm64: check power_off in kvm_arch_vcpu_runnable kvm_arch_vcpu_runnable now also checks whether the power_off flag is set. Signed-off-by: Eric Auger Reviewed-by: Christoffer Dall Signed-off-by: Christoffer Dall --- diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c index 9d2fb4772d8c..d04deeb1d4e0 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c @@ -352,7 +352,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 */