Skip to content

Commit

Permalink
KVM: PPC: Make wakeups work again for Book3S HV guests
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Avi Kivity <avi@redhat.com>
  • Loading branch information
Paul Mackerras authored and Avi Kivity committed Mar 5, 2012
1 parent befdc0a commit 4e72dbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/kvm/powerpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,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)) {
wake_up_interruptible(vcpu->arch.wqp);
vcpu->stat.halt_wakeup++;
} else if (cpu != me && cpu != -1) {
Expand Down

0 comments on commit 4e72dbe

Please sign in to comment.