]> 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>
Mon, 24 Sep 2012 12:50:53 +0000 (14:50 +0200)
commitafe41cde9122fa5a7fc23a17a18fc5836c565fa0
treefa4c2e7be175248bd381841780b46ac4b44c449c
parenta58c87a1257fa8f6bfb86f7650c5fef79f9803b4
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