diff options
author | Davidlohr Bueso <dave@stgolabs.net> | 2017-09-13 22:08:23 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-09-15 16:57:13 +0200 |
commit | 267ad7bc2d3f69af536035b6a3e4a9a2b6ae11dc (patch) | |
tree | f3aef348c35710389e1be449b0fe390b397e292d /arch/powerpc | |
parent | kvm: Serialize wq active checks in kvm_vcpu_wake_up() (diff) | |
download | linux-267ad7bc2d3f69af536035b6a3e4a9a2b6ae11dc.tar.xz linux-267ad7bc2d3f69af536035b6a3e4a9a2b6ae11dc.zip |
kvm,powerpc: Serialize wq active checks in ops->vcpu_kick
Particularly because kvmppc_fast_vcpu_kick_hv() is a callback,
ensure that we properly serialize wq active checks in order to
avoid potentially missing a wakeup due to racing with the waiter
side.
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kvm/book3s_hv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index a7177c284f9b..73bf1ebfa78f 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -181,7 +181,7 @@ static void kvmppc_fast_vcpu_kick_hv(struct kvm_vcpu *vcpu) struct swait_queue_head *wqp; wqp = kvm_arch_vcpu_wq(vcpu); - if (swait_active(wqp)) { + if (swq_has_sleeper(wqp)) { swake_up(wqp); ++vcpu->stat.halt_wakeup; } |