VirtualBox

Changeset 79832 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 17, 2019 11:26:01 AM (5 years ago)
Author:
vboxsync
Message:

VMM/HMVMXR0: Nested VMX: bugref:9180 Check VMX_EXIT_CTLS_ACK_EXT_INT before causing an external interrupt VM-exit (with interrupts still pending). Logging and assertion nits.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r79803 r79832  
    178178#define HMVMX_LOG_EXIT(a_pVCpu, a_uExitReason) \
    179179    do { \
    180         Log4(("VM-exit: vcpu[%RU32] reason=%#x -v-v-v-v-v-v-v-v-v-v-v-v-v-v-v-v-v-v-v-v-v-v-v-v-v-v-v-v-v-v-v-v-v-v-v-v-v\n", \
    181              (a_pVCpu)->idCpu, (a_uExitReason))); \
     180        const char * const pszExit = HMGetVmxExitName((a_uExitReason)); \
     181        Log4(("VM-exit: vcpu[%RU32] %85s -v-v-v-v-v-v-v-v-v-v-v-v-v-v-v-v-\n", (a_pVCpu)->idCpu, pszExit)); \
    182182    } while (0) \
    183183
     
    22032203            hmR0VmxSetMsrPermission(pVCpu, pVmcsInfo, fIsNstGstVmcs, idMsr, VMXMSRPM_ALLOW_RD_WR);
    22042204
    2205         LogFlowFunc(("MSR added, cMsrs now %u\n", cMsrs));
     2205        Log4Func(("Added MSR %#RX32, cMsrs=%u\n", idMsr, cMsrs));
    22062206        fAdded = true;
    22072207    }
     
    93609360        {
    93619361#ifdef VBOX_WITH_NESTED_HWVIRT_VMX
    9362             if (   fIsNestedGuest
    9363                 && CPUMIsGuestVmxPinCtlsSet(pVCpu, pCtx, VMX_PIN_CTLS_EXT_INT_EXIT))
     9362            if (    fIsNestedGuest
     9363                &&  CPUMIsGuestVmxPinCtlsSet(pVCpu, pCtx, VMX_PIN_CTLS_EXT_INT_EXIT)
     9364                && !CPUMIsGuestVmxExitCtlsSet(pVCpu, pCtx, VMX_EXIT_CTLS_ACK_EXT_INT))
    93649365            {
    9365                 VBOXSTRICTRC rcStrict = IEMExecVmxVmexitExtInt(pVCpu, 0/* uVector */, true /* fIntPending */);
     9366                VBOXSTRICTRC rcStrict = IEMExecVmxVmexitExtInt(pVCpu, 0 /* uVector */, true /* fIntPending */);
    93669367                if (rcStrict != VINF_VMX_INTERCEPT_NOT_ACTIVE)
    93679368                    return rcStrict;
     
    1466914670static VBOXSTRICTRC hmR0VmxExitXcpt(PVMCPU pVCpu, PVMXTRANSIENT pVmxTransient)
    1467014671{
     14672    HMVMX_ASSERT_READ(pVmxTransient, HMVMX_READ_XCPT_INFO);
     14673
    1467114674    /*
    1467214675     * If this VM-exit occurred while delivering an event through the guest IDT, take
     
    1691516918                ExitEventInfo.uIdtVectoringInfo    = pVmxTransient->uIdtVectoringInfo;
    1691616919                ExitEventInfo.uIdtVectoringErrCode = pVmxTransient->uIdtVectoringErrorCode;
     16920
     16921#ifdef DEBUG_ramshankar
     16922                hmR0VmxImportGuestState(pVCpu, pVmxTransient->pVmcsInfo, CPUMCTX_EXTRN_CS | CPUMCTX_EXTRN_RIP);
     16923                Log4Func(("cs:rip=%#04x:%#RX64 %s err_code=%#x exit_qual=%#RX64\n", pCtx->cs.Sel, pCtx->rip,
     16924                          VMX_EXIT_INT_INFO_IS_XCPT_PF(pVmxTransient->uExitIntInfo) ? "#PF" : "Unk",
     16925                          pVmxTransient->uExitIntErrorCode, pVmxTransient->uExitQual));
     16926                Log4Func(("idt_info=%#RX64 (%s) idt_errcode=%#RX32\n", pVmxTransient->uIdtVectoringInfo,
     16927                          VMX_IDT_VECTORING_INFO_IS_VALID(pVmxTransient->uIdtVectoringInfo) ? "Valid" : "Invalid",
     16928                          pVmxTransient->uIdtVectoringErrorCode));
     16929#endif
    1691716930                return IEMExecVmxVmexitXcpt(pVCpu, &ExitInfo, &ExitEventInfo);
    1691816931            }
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