diff options
| author | Paolo Bonzini <[email protected]> | 2022-09-21 00:31:54 +0000 |
|---|---|---|
| committer | Paolo Bonzini <[email protected]> | 2022-09-26 16:37:19 +0000 |
| commit | bf7f9352af5d184f28d352a58cb9230e404f8c5c (patch) | |
| tree | 72d55dcef90b06db834d5859b7e4bc5b7dc6867b | |
| parent | KVM: x86: Rename kvm_apic_has_events() to make it INIT/SIPI specific (diff) | |
| download | kernel-bf7f9352af5d184f28d352a58cb9230e404f8c5c.tar.gz kernel-bf7f9352af5d184f28d352a58cb9230e404f8c5c.zip | |
KVM: x86: lapic does not have to process INIT if it is blocked
Do not return true from kvm_vcpu_has_events() if the vCPU isn' going to
immediately process a pending INIT/SIPI. INIT/SIPI shouldn't be treated
as wake events if they are blocked.
Signed-off-by: Paolo Bonzini <[email protected]>
[sean: rebase onto refactored INIT/SIPI helpers, massage changelog]
Signed-off-by: Sean Christopherson <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| -rw-r--r-- | arch/x86/kvm/x86.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 057246c30bb5..aa6d6a0787d8 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -12767,7 +12767,8 @@ static inline bool kvm_vcpu_has_events(struct kvm_vcpu *vcpu) if (!list_empty_careful(&vcpu->async_pf.done)) return true; - if (kvm_apic_has_pending_init_or_sipi(vcpu)) + if (kvm_apic_has_pending_init_or_sipi(vcpu) && + kvm_apic_init_sipi_allowed(vcpu)) return true; if (vcpu->arch.pv.pv_unhalted) |
