linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: eric.auger@linaro.org (Eric Auger)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/4] KVM: arm/arm64: check power_off in kvm_arch_vcpu_runnable
Date: Fri,  7 Aug 2015 18:08:31 +0200	[thread overview]
Message-ID: <1438963713-10460-3-git-send-email-eric.auger@linaro.org> (raw)
In-Reply-To: <1438963713-10460-1-git-send-email-eric.auger@linaro.org>

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

  parent reply	other threads:[~2015-08-07 16:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-07 16:08 [PATCH v2 0/4] KVM: arm/arm64: guest synchronous halt/resume Eric Auger
2015-08-07 16:08 ` [PATCH v2 1/4] KVM: arm/arm64: rename pause into power_off Eric Auger
2015-08-07 16:08 ` Eric Auger [this message]
2015-08-07 16:08 ` [PATCH v2 3/4] KVM: arm/arm64: check power_off in critical section before VCPU run Eric Auger
2015-08-31 10:12   ` Christoffer Dall
2015-08-07 16:08 ` [PATCH v2 4/4] KVM: arm/arm64: implement kvm_arm_[halt,resume]_guest Eric Auger
2015-08-31 10:43   ` Christoffer Dall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1438963713-10460-3-git-send-email-eric.auger@linaro.org \
    --to=eric.auger@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).