]> git.karo-electronics.de Git - karo-tx-linux.git/commit
KVM: PPC: Book3S HV: Fix updates of vcpu->cpu
authorPaul Mackerras <paulus@samba.org>
Thu, 20 Sep 2012 19:35:51 +0000 (19:35 +0000)
committerAlexander Graf <agraf@suse.de>
Fri, 5 Oct 2012 21:34:03 +0000 (23:34 +0200)
commit023607dfd1c800cb10c03f9fc048b7de8eb329fc
tree80c2e7d57d2c52e917530f67739f0c7e96c646b3
parentd8d353ba4f7b4fee12c27e0b4202d6441c5439e3
KVM: PPC: Book3S HV: Fix updates of vcpu->cpu

This 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 <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
arch/powerpc/kvm/book3s_pr.c
arch/powerpc/kvm/booke.c
arch/powerpc/kvm/powerpc.c