[29/50] KVM: PPC: Make wakeups work again for Book3S HV guests

Submitted by Alexander Graf on Jan. 4, 2012, 1:10 a.m.


Message ID 1325639448-9494-30-git-send-email-agraf@suse.de
State New
Headers show

Commit Message

Alexander Graf Jan. 4, 2012, 1:10 a.m.
From: Paul Mackerras <paulus@samba.org>

When commit f43fdc15fa ("KVM: PPC: booke: Improve timer register
emulation") factored out some code in arch/powerpc/kvm/powerpc.c
into a new helper function, kvm_vcpu_kick(), an error crept in
which causes Book3s HV guest vcpus to stall.  This fixes it.
On POWER7 machines, guest vcpus are grouped together into virtual
CPU cores that share a single waitqueue, so it's important to use
vcpu->arch.wqp rather than &vcpu->wq.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
 arch/powerpc/kvm/powerpc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch hide | download patch | download mbox

diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index ef8c990..b939b8a 100644
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -561,7 +561,7 @@  void kvm_vcpu_kick(struct kvm_vcpu *vcpu)
         int cpu = vcpu->cpu;
         me = get_cpu();
-	if (waitqueue_active(&vcpu->wq)) {
+	if (waitqueue_active(vcpu->arch.wqp)) {
 	} else if (cpu != me && cpu != -1) {