From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Zyngier Subject: Re: [PATCH 06/10] arm/arm64: kvm: Set vcpu->cpu to -1 on vcpu_put Date: Mon, 16 Dec 2013 11:49:54 +0000 Message-ID: <52AEE8E2.1090500@arm.com> References: <1386878149-13397-1-git-send-email-christoffer.dall@linaro.org> <1386878149-13397-7-git-send-email-christoffer.dall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: "kvmarm@lists.cs.columbia.edu" , "kvm@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linaro-kernel@lists.linaro.org" , "patches@linaro.org" To: Christoffer Dall Return-path: Received: from fw-tnat.austin.arm.com ([217.140.110.23]:32545 "EHLO highbank-bc01-b06.austin.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753202Ab3LPLt4 (ORCPT ); Mon, 16 Dec 2013 06:49:56 -0500 In-Reply-To: <1386878149-13397-7-git-send-email-christoffer.dall@linaro.org> Sender: kvm-owner@vger.kernel.org List-ID: On 12/12/13 19:55, Christoffer Dall wrote: > 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. > > Signed-off-by: Christoffer Dall Acked-by: Marc Zyngier M. > --- > Changelog[v4]: > - New in series > > arch/arm/kvm/arm.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > 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); > } > > -- Jazz is not dead. It just smells funny...