VirtualBox

Changeset 57886 in vbox


Ignore:
Timestamp:
Sep 24, 2015 5:40:34 PM (9 years ago)
Author:
vboxsync
Message:

HMVMXR0.cpp: Disabled incorrect assertion in hmR0VmxExitIoInstr. Replaced incorrect use of DEBUG with VBOX_STRICT and LOG_ENABLED.

File:
1 edited

Legend:

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

    r57860 r57886  
    46294629            rc |= hmR0VmxAddAutoLoadStoreMsr(pVCpu, MSR_K8_KERNEL_GS_BASE, pMixedCtx->msrKERNELGSBASE, false, NULL);
    46304630            AssertRCReturn(rc, rc);
    4631 #ifdef DEBUG
     4631# ifdef LOG_ENABLED
    46324632            PVMXAUTOMSR pMsr = (PVMXAUTOMSR)pVCpu->hm.s.vmx.pvGuestMsr;
    46334633            for (uint32_t i = 0; i < pVCpu->hm.s.vmx.cMsrs; i++, pMsr++)
     
    91179117
    91189118
    9119 #ifdef DEBUG
     9119#ifdef VBOX_STRICT
    91209120/* Is there some generic IPRT define for this that are not in Runtime/internal/\* ?? */
    91219121# define HMVMX_ASSERT_PREEMPT_CPUID_VAR() \
     
    91239123
    91249124# define HMVMX_ASSERT_PREEMPT_CPUID() \
    9125    do \
    9126    { \
    9127         RTCPUID const idAssertCpuNow = RTThreadPreemptIsEnabled(NIL_RTTHREAD) ? NIL_RTCPUID : RTMpCpuId(); \
    9128         AssertMsg(idAssertCpu == idAssertCpuNow,  ("VMX %#x, %#x\n", idAssertCpu, idAssertCpuNow)); \
    9129    } while (0)
     9125    do { \
     9126         RTCPUID const idAssertCpuNow = RTThreadPreemptIsEnabled(NIL_RTTHREAD) ? NIL_RTCPUID : RTMpCpuId(); \
     9127         AssertMsg(idAssertCpu == idAssertCpuNow,  ("VMX %#x, %#x\n", idAssertCpu, idAssertCpuNow)); \
     9128    } while (0)
    91309129
    91319130# define HMVMX_VALIDATE_EXIT_HANDLER_PARAMS() \
    9132             do { \
    9133                 AssertPtr(pVCpu); \
    9134                 AssertPtr(pMixedCtx); \
    9135                 AssertPtr(pVmxTransient); \
    9136                 Assert(pVmxTransient->fVMEntryFailed == false); \
    9137                 Assert(ASMIntAreEnabled()); \
    9138                 HMVMX_ASSERT_PREEMPT_SAFE(); \
    9139                 HMVMX_ASSERT_PREEMPT_CPUID_VAR(); \
    9140                 Log4Func(("vcpu[%RU32] -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", pVCpu->idCpu)); \
    9141                 HMVMX_ASSERT_PREEMPT_SAFE(); \
    9142                 if (VMMR0IsLogFlushDisabled(pVCpu)) \
    9143                     HMVMX_ASSERT_PREEMPT_CPUID(); \
    9144                 HMVMX_STOP_EXIT_DISPATCH_PROF(); \
    9145             } while (0)
     9131    do { \
     9132        AssertPtr(pVCpu); \
     9133        AssertPtr(pMixedCtx); \
     9134        AssertPtr(pVmxTransient); \
     9135        Assert(pVmxTransient->fVMEntryFailed == false); \
     9136        Assert(ASMIntAreEnabled()); \
     9137        HMVMX_ASSERT_PREEMPT_SAFE(); \
     9138        HMVMX_ASSERT_PREEMPT_CPUID_VAR(); \
     9139        Log4Func(("vcpu[%RU32] -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", pVCpu->idCpu)); \
     9140        HMVMX_ASSERT_PREEMPT_SAFE(); \
     9141        if (VMMR0IsLogFlushDisabled(pVCpu)) \
     9142            HMVMX_ASSERT_PREEMPT_CPUID(); \
     9143        HMVMX_STOP_EXIT_DISPATCH_PROF(); \
     9144    } while (0)
    91469145
    91479146# define HMVMX_VALIDATE_EXIT_XCPT_HANDLER_PARAMS() \
    9148             do { \
    9149                 Log4Func(("\n")); \
    9150             } while (0)
    9151 #else   /* Release builds */
     9147    do { \
     9148        Log4Func(("\n")); \
     9149    } while (0)
     9150#else /* nonstrict builds: */
    91529151# define HMVMX_VALIDATE_EXIT_HANDLER_PARAMS() \
    9153             do { \
    9154                 HMVMX_STOP_EXIT_DISPATCH_PROF(); \
    9155                 NOREF(pVCpu); NOREF(pMixedCtx); NOREF(pVmxTransient); \
    9156             } while (0)
     9152    do { \
     9153        HMVMX_STOP_EXIT_DISPATCH_PROF(); \
     9154        NOREF(pVCpu); NOREF(pMixedCtx); NOREF(pVmxTransient); \
     9155    } while (0)
    91579156# define HMVMX_VALIDATE_EXIT_XCPT_HANDLER_PARAMS() do { } while (0)
    91589157#endif
     
    1110011099    }
    1110111100
    11102 #ifdef DEBUG
     11101#ifdef VBOX_STRICT
    1110311102    if (rcStrict == VINF_IOM_R3_IOPORT_READ)
    1110411103        Assert(!fIOWrite);
     
    1110711106    else
    1110811107    {
    11109         /** @todo r=bird: This is missing a bunch of VINF_EM_FIRST..VINF_EM_LAST
    11110          *        statuses, that the VMM device and some others may return. See
    11111          *        IOM_SUCCESS() for guidance. */
     11108#if 0 /** @todo r=bird: This is missing a bunch of VINF_EM_FIRST..VINF_EM_LAST
     11109       *        statuses, that the VMM device and some others may return. See
     11110       *        IOM_SUCCESS() for guidance. */
    1111211111        AssertMsg(   RT_FAILURE(rcStrict)
    1111311112                  || rcStrict == VINF_SUCCESS
     
    1111711116                  || rcStrict == VINF_EM_RAW_TO_R3
    1111811117                  || rcStrict == VINF_TRPM_XCPT_DISPATCHED, ("%Rrc\n", VBOXSTRICTRC_VAL(rcStrict)));
     11118#endif
    1111911119    }
    1112011120#endif
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