From: christoffer.dall@linaro.org (Christoffer Dall)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 06/10] arm/arm64: kvm: Set vcpu->cpu to -1 on vcpu_put
Date: Mon, 16 Dec 2013 21:29:57 -0800 [thread overview]
Message-ID: <1387258201-8738-7-git-send-email-christoffer.dall@linaro.org> (raw)
In-Reply-To: <1387258201-8738-1-git-send-email-christoffer.dall@linaro.org>
The arch-generic KVM code expects the cpu field of a vcpu to be -1 if
the vcpu is no longer assigned to a cpu. This is used for the optimized
make_all_cpus_request path and will be used by the vgic code to check
that no vcpus are running.
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
---
arch/arm/kvm/arm.c | 7 +++++++
1 file changed, 7 insertions(+)
Changelog[v4]:
- New in series
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
index f290b22..b92ff6d3 100644
--- a/arch/arm/kvm/arm.c
+++ b/arch/arm/kvm/arm.c
@@ -342,6 +342,13 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)
{
+ /*
+ * The arch-generic KVM code expects the cpu field of a vcpu to be -1
+ * if the vcpu is no longer assigned to a cpu. This is used for the
+ * optimized make_all_cpus_request path.
+ */
+ vcpu->cpu = -1;
+
kvm_arm_set_running_vcpu(NULL);
}
--
1.8.5
next prev parent reply other threads:[~2013-12-17 5:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-17 5:29 [PATCH v5 00/10] Support VGIC save/restore using device control API Christoffer Dall
2013-12-17 5:29 ` [PATCH v5 01/10] ARM: KVM: Allow creating the VGIC after VCPUs Christoffer Dall
2013-12-17 5:29 ` [PATCH v5 02/10] KVM: arm-vgic: Support KVM_CREATE_DEVICE for VGIC Christoffer Dall
2013-12-17 5:29 ` [PATCH v5 03/10] KVM: arm-vgic: Set base addr through device API Christoffer Dall
2013-12-17 5:29 ` [PATCH v5 04/10] irqchip: arm-gic: Define additional MMIO offsets and masks Christoffer Dall
2013-12-17 5:29 ` [PATCH v5 05/10] KVM: arm-vgic: Make vgic mmio functions more generic Christoffer Dall
2013-12-17 5:29 ` Christoffer Dall [this message]
2013-12-17 5:29 ` [PATCH v5 07/10] KVM: arm-vgic: Add vgic reg access from dev attr Christoffer Dall
2013-12-17 5:29 ` [PATCH v5 08/10] KVM: arm-vgic: Support unqueueing of LRs to the dist Christoffer Dall
2013-12-21 11:00 ` Marc Zyngier
2013-12-17 5:30 ` [PATCH v5 09/10] KVM: arm-vgic: Add GICD_SPENDSGIR and GICD_CPENDSGIR handlers Christoffer Dall
2013-12-17 5:30 ` [PATCH v5 10/10] KVM: arm-vgic: Support CPU interface reg access Christoffer Dall
2013-12-21 11:15 ` [PATCH v5 00/10] Support VGIC save/restore using device control API Marc Zyngier
2013-12-21 17:54 ` 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=1387258201-8738-7-git-send-email-christoffer.dall@linaro.org \
--to=christoffer.dall@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).