]> git.baikalelectronics.ru Git - kernel.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:38:52 +0000 (23:38 +0200)
commit4935fcdf53fb810cc1fe908b0b1a7ff950b3613a
tree80c2e7d57d2c52e917530f67739f0c7e96c646b3
parenta7caa9fa182e5c6532af418a0ba6b59f0ee41f62
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