From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Mackerras Date: Fri, 17 Aug 2012 10:42:27 +0000 Subject: Re: [PATCH 1/7] powerpc/kvm: Fix updates of vcpu->cpu on HV KVM Message-Id: <20120817104227.GC19296@bloggs.ozlabs.ibm.com> List-Id: References: <1345192683.11751.66.camel@pasglop> In-Reply-To: <1345192683.11751.66.camel@pasglop> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Benjamin Herrenschmidt Cc: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org, Alexander Graf On Fri, Aug 17, 2012 at 06:38:03PM +1000, Benjamin Herrenschmidt wrote: > This patch removes the powerpc "generic" updates of vcpu->cpu in > load and put, and moves them to the various backends. > > The reason is that "HV" KVM does its own sauce with that field > and the generic updates might corrupt it. The field contains the > CPU# of the -first- HW CPU of the core always for all the VCPU > threads of a core (the one that's online from a host Linux > perspective). > > However, the preempt notifiers are going to be called on the > threads VCPUs when they are running (due to them sleeping on our > private waitqueue) causing unload to be called, potentially > clobbering the value. > > Signed-off-by: Benjamin Herrenschmidt Acked-by: Paul Mackerras