Changeset 31350 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Aug 4, 2010 8:58:21 AM (14 years ago)
- Location:
- trunk/src/VBox/VMM/VMMR0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/GMMR0.cpp
r30902 r31350 4097 4097 #endif 4098 4098 4099 #ifdef DEBUG_sandervl4100 4099 /** 4101 4100 * Setup for a GMMR0CheckSharedModules call (to allow log flush jumps back to ring 3) … … 4142 4141 return VINF_SUCCESS; 4143 4142 } 4144 #endif4145 4143 4146 4144 /** … … 4164 4162 return rc; 4165 4163 4166 # ifndef DEBUG_sandervl4167 /*4168 * Take the sempahore and do some more validations.4169 */4170 rc = RTSemFastMutexRequest(pGMM->Mtx);4171 AssertRC(rc);4172 # endif4173 4164 if (GMM_CHECK_SANITY_UPON_ENTERING(pGMM)) 4174 4165 { … … 4191 4182 rc = VERR_INTERNAL_ERROR_5; 4192 4183 4193 # ifndef DEBUG_sandervl4194 RTSemFastMutexRelease(pGMM->Mtx);4195 # endif4196 4184 return rc; 4197 4185 #else -
trunk/src/VBox/VMM/VMMR0/VMMR0.cpp
r31348 r31350 965 965 PVMCPU pVCpu = &pVM->aCpus[idCpu]; 966 966 967 # ifdef VBOX_WITH_VMMR0_DISABLE_PREEMPTION 968 RTTHREADPREEMPTSTATE PreemptState = RTTHREADPREEMPTSTATE_INITIALIZER; 969 RTThreadPreemptDisable(&PreemptState); 970 # elif !defined(RT_OS_WINDOWS) 971 RTCCUINTREG uFlags = ASMIntDisableFlags(); 972 # endif 973 /* Select a valid VCPU context. */ 974 ASMAtomicWriteU32(&pVCpu->idHostCpu, RTMpCpuId()); 975 976 # ifdef DEBUG_sandervl 977 /* Make sure that log flushes can jump back to ring-3; annoying to get an incomplete log (this is risky though as the code doesn't take this into account). */ 967 /* Make sure that log flushes can jump back to ring-3; annoying to get an incomplete log (this is risky though as the code doesn't take this into account). 968 * Also grab the fast mutex before disabling preemption. 969 */ 978 970 int rc = GMMR0CheckSharedModulesStart(pVM); 979 971 if (rc == VINF_SUCCESS) 980 972 { 973 # ifdef VBOX_WITH_VMMR0_DISABLE_PREEMPTION 974 RTTHREADPREEMPTSTATE PreemptState = RTTHREADPREEMPTSTATE_INITIALIZER; 975 RTThreadPreemptDisable(&PreemptState); 976 # elif !defined(RT_OS_WINDOWS) 977 RTCCUINTREG uFlags = ASMIntDisableFlags(); 978 # endif 979 /* Select a valid VCPU context. */ 980 ASMAtomicWriteU32(&pVCpu->idHostCpu, RTMpCpuId()); 981 981 982 rc = vmmR0CallRing3SetJmp(&pVCpu->vmm.s.CallRing3JmpBufR0, GMMR0CheckSharedModules, pVM, pVCpu); /* this may resume code. */ 983 984 /* Clear the VCPU context. */ 985 ASMAtomicWriteU32(&pVCpu->idHostCpu, NIL_RTCPUID); 986 # ifdef VBOX_WITH_VMMR0_DISABLE_PREEMPTION 987 RTThreadPreemptRestore(&PreemptState); 988 # elif !defined(RT_OS_WINDOWS) 989 ASMSetFlags(uFlags); 990 # endif 991 982 992 GMMR0CheckSharedModulesEnd(pVM); 983 993 } 984 # else985 int rc = GMMR0CheckSharedModules(pVM, pVCpu);986 # endif987 988 /* Clear the VCPU context. */989 ASMAtomicWriteU32(&pVCpu->idHostCpu, NIL_RTCPUID);990 # ifdef VBOX_WITH_VMMR0_DISABLE_PREEMPTION991 RTThreadPreemptRestore(&PreemptState);992 # elif !defined(RT_OS_WINDOWS)993 ASMSetFlags(uFlags);994 # endif995 994 return rc; 996 995 }
Note:
See TracChangeset
for help on using the changeset viewer.