Skip to content

Commit 4f09ebd

Browse files
committed
KVM: nVMX: Check for pending INIT/SIPI after entering non-root mode
Explicitly check for a pending INIT or SIPI after entering non-root mode during nested VM-Enter emulation, as no VMCS information is quered as part of the check, i.e. there is no need to check for INIT/SIPI while vmcs01 is still loaded. Link: https://lore.kernel.org/r/20241101191447.1807602-3-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent cda3960 commit 4f09ebd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

arch/x86/kvm/vmx/nested.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3531,8 +3531,6 @@ enum nvmx_vmentry_status nested_vmx_enter_non_root_mode(struct kvm_vcpu *vcpu,
35313531
(CPU_BASED_INTR_WINDOW_EXITING | CPU_BASED_NMI_WINDOW_EXITING);
35323532
if (likely(!evaluate_pending_interrupts) && kvm_vcpu_apicv_active(vcpu))
35333533
evaluate_pending_interrupts |= vmx_has_apicv_interrupt(vcpu);
3534-
if (!evaluate_pending_interrupts)
3535-
evaluate_pending_interrupts |= kvm_apic_has_pending_init_or_sipi(vcpu);
35363534

35373535
if (!vmx->nested.nested_run_pending ||
35383536
!(vmcs12->vm_entry_controls & VM_ENTRY_LOAD_DEBUG_CONTROLS))
@@ -3619,6 +3617,7 @@ enum nvmx_vmentry_status nested_vmx_enter_non_root_mode(struct kvm_vcpu *vcpu,
36193617
* unconditionally.
36203618
*/
36213619
if (unlikely(evaluate_pending_interrupts) ||
3620+
kvm_apic_has_pending_init_or_sipi(vcpu) ||
36223621
kvm_apic_has_interrupt(vcpu))
36233622
kvm_make_request(KVM_REQ_EVENT, vcpu);
36243623

0 commit comments

Comments
 (0)