aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/x86/kvm/lapic.c
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2021-10-08 19:12:12 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2021-12-08 04:24:54 -0500
commitd92a5d1c6c757f659ffb9c2c2e65fcf3d571c14e (patch)
treed3663182b39a92132372e69e97031f17c19f08d5 /arch/x86/kvm/lapic.c
parentKVM: x86: Invoke kvm_vcpu_block() directly for non-HALTED wait states (diff)
downloadwireguard-linux-d92a5d1c6c757f659ffb9c2c2e65fcf3d571c14e.tar.xz
wireguard-linux-d92a5d1c6c757f659ffb9c2c2e65fcf3d571c14e.zip
KVM: Add helpers to wake/query blocking vCPU
Add helpers to wake and query a blocking vCPU. In addition to providing nice names, the helpers reduce the probability of KVM neglecting to use kvm_arch_vcpu_get_wait(). No functional change intended. Signed-off-by: Sean Christopherson <seanjc@google.com> Message-Id: <20211009021236.4122790-20-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/lapic.c')
-rw-r--r--arch/x86/kvm/lapic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 451e80306b51..bbac8477b3ec 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -1931,7 +1931,7 @@ void kvm_lapic_expired_hv_timer(struct kvm_vcpu *vcpu)
/* If the preempt notifier has already run, it also called apic_timer_expired */
if (!apic->lapic_timer.hv_timer_in_use)
goto out;
- WARN_ON(rcuwait_active(&vcpu->wait));
+ WARN_ON(kvm_vcpu_is_blocking(vcpu));
apic_timer_expired(apic, false);
cancel_hv_timer(apic);