KVM: arm/arm64: check power_off in kvm_arch_vcpu_runnable
authorEric Auger <eric.auger@linaro.org>
Fri, 25 Sep 2015 21:41:15 +0000 (23:41 +0200)
committerChristoffer Dall <christoffer.dall@linaro.org>
Thu, 22 Oct 2015 21:01:46 +0000 (23:01 +0200)
kvm_arch_vcpu_runnable now also checks whether the power_off
flag is set.

Signed-off-by: Eric Auger <eric.auger@linaro.org>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
arch/arm/kvm/arm.c

index 9d2fb4772d8cd8f7915acd2f0c54474592f05e90..d04deeb1d4e01633c212c2b3a86e7881c79fe005 100644 (file)
@@ -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 */