VirtualBox

Changeset 74899 in vbox


Ignore:
Timestamp:
Oct 18, 2018 6:01:28 AM (6 years ago)
Author:
vboxsync
Message:

VMM/EM: Nested VMX: bugref:9180 Interrupt-window must work even if an interrupt isn't actually pending when interrupts are enabled.
The problem is we don't have hooks when EFLAGS change, so this is the best we can do atm.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/EM.cpp

    r74876 r74899  
    17701770
    17711771    /** @todo NSTVMX: Virtual interrupt injection. */
    1772     if (   pVCpu->cpum.GstCtx.eflags.Bits.u1IF
    1773         && VMCPU_FF_IS_ANY_SET(pVCpu, VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC))
    1774     {
     1772    if (pVCpu->cpum.GstCtx.eflags.Bits.u1IF)
     1773    {
     1774        Assert(!VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_INHIBIT_INTERRUPTS));
    17751775        if (CPUMIsGuestVmxProcCtlsSet(pVCpu, &pVCpu->cpum.GstCtx, VMX_PROC_CTLS_INT_WINDOW_EXIT))
    17761776        {
    1777             /* CPUM_IMPORT_EXTRN_RET(pVCpu, IEM_CPUMCTX_EXTRN_SVM_VMEXIT_MASK); */ /** @todo NSTVMX: Mask. */
     1777            CPUM_IMPORT_EXTRN_RET(pVCpu, IEM_CPUMCTX_EXTRN_VMX_VMEXIT_MASK);
    17781778            VBOXSTRICTRC rcStrict = IEMExecVmxVmexitIntWindow(pVCpu);
    17791779            if (rcStrict != VINF_VMX_INTERCEPT_NOT_ACTIVE)
     
    17921792        }
    17931793
    1794         int rc = emR3GstInjectIntr(pVCpu, pfWakeupPending, pfInjected);
    1795         if (rc == VINF_VMX_VMEXIT)
    1796             rc = VINF_SUCCESS;
    1797         return rc;
     1794        Assert(pVCpu->em.s.enmState != EMSTATE_WAIT_SIPI);
     1795        if (VMCPU_FF_IS_ANY_SET(pVCpu, VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC))
     1796        {
     1797            int rc = emR3GstInjectIntr(pVCpu, pfWakeupPending, pfInjected);
     1798            if (rc == VINF_VMX_VMEXIT)
     1799                rc = VINF_SUCCESS;
     1800            return rc;
     1801        }
    17981802    }
    17991803
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette