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)
commita47d72f3613d5edfd8e752c9b804d7df35810649
tree80c2e7d57d2c52e917530f67739f0c7e96c646b3
parented7a8d7a3c5dd4adedb271112b6faba45c7037f9
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
This page took 0.039579 seconds and 5 git commands to generate.