VirtualBox

Changeset 76856 in vbox for trunk/src/VBox/VMM/VMMR3


Ignore:
Timestamp:
Jan 17, 2019 1:07:33 PM (6 years ago)
Author:
vboxsync
Message:

VMM: Nested VMX: bugref:9180 Fix external interrupt intercept. Also, no need to do this in TRPMR3InjectEvent as it will be handled in IEMInjectTrap eventually.

Location:
trunk/src/VBox/VMM/VMMR3
Files:
2 edited

Legend:

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

    r76840 r76856  
    606606                AssertFailedReturn(VERR_INVALID_PARAMETER);
    607607        }
    608         LogRel(("EM: Set execution policy (fRecompileUser=%RTbool fRecompileSupervisor=%RTbool fIemExecutesAll=%RTbool)\n",
    609                 pVM->fRecompileUser, pVM->fRecompileSupervisor, pVM->em.s.fIemExecutesAll));
     608        Log(("EM: Set execution policy (fRecompileUser=%RTbool fRecompileSupervisor=%RTbool fIemExecutesAll=%RTbool)\n",
     609             pVM->fRecompileUser, pVM->fRecompileSupervisor, pVM->em.s.fIemExecutesAll));
    610610    }
    611611
     
    17261726
    17271727/**
    1728  * Helper for emR3ForcedActions() for VMX interrupt-window VM-exits.
     1728 * Helper for emR3ForcedActions() for VMX interrupt-window VM-exit and VMX external
     1729 * interrupt VM-exit.
    17291730 *
    17301731 * @returns VBox status code.
    17311732 * @param   pVCpu       The cross context virtual CPU structure.
    17321733 */
    1733 static int emR3VmxNstGstIntrWindowExit(PVMCPU pVCpu)
     1734static int emR3VmxNstGstIntrIntercept(PVMCPU pVCpu)
    17341735{
    17351736#ifdef VBOX_WITH_NESTED_HWVIRT_VMX
     
    17471748        AssertMsgFailed(("Interrupt-window Vm-exit failed! rc=%Rrc\n", VBOXSTRICTRC_VAL(rcStrict)));
    17481749        return VINF_EM_TRIPLE_FAULT;
     1750    }
     1751    /* Handle the "external interrupt" VM-exit intercept. */
     1752    else if (CPUMIsGuestVmxPinCtlsSet(pVCpu, &pVCpu->cpum.GstCtx, VMX_PIN_CTLS_EXT_INT_EXIT))
     1753    {
     1754        VBOXSTRICTRC rcStrict = IEMExecVmxVmexitExtInt(pVCpu, 0 /* uVector */, true /* fIntPending */);
     1755        Assert(rcStrict != VINF_PGM_CHANGE_MODE);
     1756        Assert(rcStrict != VINF_VMX_VMEXIT);
     1757        if (rcStrict != VINF_VMX_INTERCEPT_NOT_ACTIVE)
     1758            return VBOXSTRICTRC_TODO(rcStrict);
    17491759    }
    17501760#else
     
    22152225
    22162226                        if (CPUMIsGuestInVmxNonRootMode(&pVCpu->cpum.GstCtx))
    2217                             rc2 = emR3VmxNstGstIntrWindowExit(pVCpu);
     2227                            rc2 = emR3VmxNstGstIntrIntercept(pVCpu);
    22182228                        else if (CPUMIsGuestInSvmNestedHwVirtMode(&pVCpu->cpum.GstCtx))
    22192229                            rc2 = emR3SvmNstGstIntrIntercept(pVCpu);
  • trunk/src/VBox/VMM/VMMR3/TRPM.cpp

    r76553 r76856  
    15911591    if (RT_SUCCESS(rc))
    15921592    {
    1593 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX
    1594         /* Handle the "acknowledge interrupt on exit" VM-exit intercept. */
    1595         if (CPUMIsGuestInVmxNonRootMode(pCtx))
    1596         {
    1597             if (   CPUMIsGuestVmxExitCtlsSet(pVCpu, pCtx, VMX_EXIT_CTLS_ACK_EXT_INT)
    1598                 && CPUMIsGuestVmxPinCtlsSet(pVCpu, pCtx, VMX_PIN_CTLS_EXT_INT_EXIT))
    1599             {
    1600                 VBOXSTRICTRC rcStrict = IEMExecVmxVmexitExtInt(pVCpu, u8Interrupt, false /* fIntPending */);
    1601                 Assert(rcStrict != VINF_PGM_CHANGE_MODE);
    1602                 if (rcStrict != VINF_VMX_INTERCEPT_NOT_ACTIVE)
    1603                     return VBOXSTRICTRC_TODO(rcStrict);
    1604             }
    1605         }
    1606 #endif
    16071593        *pfInjected = true;
    16081594        if (!VM_IS_NEM_ENABLED(pVM))
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