Changeset 20873 in vbox
- Timestamp:
- Jun 24, 2009 2:08:38 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm.h
r20871 r20873 371 371 VMMRCDECL(int) VMMGCEntry(PVM pVM, unsigned uOperation, unsigned uArg, ...); 372 372 VMMRCDECL(void) VMMGCGuestToHost(PVM pVM, int rc); 373 VMMRCDECL(int) VMMGCCallHost(PVM pVM, VMMCALLHOST enmOperation, uint64_t uArg);374 373 VMMRCDECL(void) VMMGCLogFlushIfFull(PVM pVM); 375 374 /** @} */ -
trunk/src/VBox/VMM/VMMAll/MMAllHyper.cpp
r20864 r20873 169 169 #endif 170 170 int rc = PDMCritSectEnter(&pHeap->Lock, VERR_SEM_BUSY); 171 #if def IN_RC171 #if defined(IN_RC) || defined(IN_RING0) 172 172 if (rc == VERR_SEM_BUSY) 173 rc = VMMGCCallHost(pVM, VMMCALLHOST_MMHYPER_LOCK, 0); 174 #elif defined(IN_RING0) 175 if (rc == VERR_SEM_BUSY) 176 rc = VMMR0CallHost(pVM, VMMCALLHOST_MMHYPER_LOCK, 0); 173 rc = VMMRZCallRing3NoCpu(pVM, VMMCALLHOST_MMHYPER_LOCK, 0); 177 174 #endif 178 175 AssertRC(rc); -
trunk/src/VBox/VMM/VMMAll/PDMAll.cpp
r20654 r20873 259 259 Assert(pVM->pdm.s.Apic.CTX_SUFF(pfnGetTPR)); 260 260 /* We don't acquire the PDM lock here as we're just reading information. Doing so causes massive 261 * contention as this function is called very often by each and every VCPU. 261 * contention as this function is called very often by each and every VCPU. 262 262 */ 263 263 *pu8TPR = pVM->pdm.s.Apic.CTX_SUFF(pfnGetTPR)(pVM->pdm.s.Apic.CTX_SUFF(pDevIns), pVCpu->idCpu); … … 328 328 int rc = PDMCritSectEnter(&pVM->pdm.s.CritSect, VERR_GENERAL_FAILURE); 329 329 if (rc == VERR_GENERAL_FAILURE) 330 { 331 # ifdef IN_RC 332 rc = VMMGCCallHost(pVM, VMMCALLHOST_PDM_LOCK, 0); 333 # else 334 rc = VMMR0CallHost(pVM, VMMCALLHOST_PDM_LOCK, 0); 335 # endif 336 } 330 rc = VMMRZCallRing3NoCpu(pVM, VMMCALLHOST_PDM_LOCK, 0); 337 331 #endif 338 332 AssertRC(rc); -
trunk/src/VBox/VMM/VMMAll/PDMAllQueue.cpp
r19785 r20873 180 180 PVM pVM = pQueue->CTX_SUFF(pVM); 181 181 182 #if def IN_RC183 Assert(pQueue-> pVMRC);182 #if defined(IN_RC) || defined(IN_RING0) 183 Assert(pQueue->CTX_SUFF(pVM)); 184 184 pVM->pdm.s.CTX_SUFF(pQueueFlush) = pQueue; 185 VMMGCCallHost(pVM, VMMCALLHOST_PDM_QUEUE_FLUSH, (uintptr_t)pQueue); 186 187 #elif defined(IN_RING0) 188 Assert(pQueue->pVMR0); 189 pVM->pdm.s.CTX_SUFF(pQueueFlush) = pQueue; 190 VMMR0CallHost(pVM, VMMCALLHOST_PDM_QUEUE_FLUSH, (uintptr_t)pQueue); 185 VMMRZCallRing3NoCpu(pVM, VMMCALLHOST_PDM_QUEUE_FLUSH, (uintptr_t)pQueue); 191 186 192 187 #else /* IN_RING3: */ -
trunk/src/VBox/VMM/VMMAll/PGMAll.cpp
r20795 r20873 2077 2077 { 2078 2078 int rc = PDMCritSectEnter(&pVM->pgm.s.CritSect, VERR_SEM_BUSY); 2079 #if def IN_RC2079 #if defined(IN_RC) || defined(IN_RING0) 2080 2080 if (rc == VERR_SEM_BUSY) 2081 rc = VMMGCCallHost(pVM, VMMCALLHOST_PGM_LOCK, 0); 2082 #elif defined(IN_RING0) 2083 if (rc == VERR_SEM_BUSY) 2084 rc = VMMR0CallHost(pVM, VMMCALLHOST_PGM_LOCK, 0); 2081 rc = VMMRZCallRing3NoCpu(pVM, VMMCALLHOST_PGM_LOCK, 0); 2085 2082 #endif 2086 2083 AssertMsg(rc == VINF_SUCCESS, ("%Rrc\n", rc)); -
trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp
r20770 r20873 271 271 #ifdef IN_RING3 272 272 int rc = PGMR3PhysAllocateHandyPages(pVM); 273 #elif defined(IN_RING0)274 int rc = VMMR0CallHost(pVM, VMMCALLHOST_PGM_ALLOCATE_HANDY_PAGES, 0);275 273 #else 276 int rc = VMM GCCallHost(pVM, VMMCALLHOST_PGM_ALLOCATE_HANDY_PAGES, 0);274 int rc = VMMRZCallRing3NoCpu(pVM, VMMCALLHOST_PGM_ALLOCATE_HANDY_PAGES, 0); 277 275 #endif 278 276 if (RT_UNLIKELY(rc != VINF_SUCCESS)) -
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r20773 r20873 4009 4009 int rc = PGMR3PoolGrow(pVM); 4010 4010 #else 4011 int rc = CTXALLMID(VMM, CallHost)(pVM, VMMCALLHOST_PGM_POOL_GROW, 0);4011 int rc = VMMRZCallRing3NoCpu(pVM, VMMCALLHOST_PGM_POOL_GROW, 0); 4012 4012 #endif 4013 4013 if (RT_FAILURE(rc)) -
trunk/src/VBox/VMM/VMMAll/VMAll.cpp
r19300 r20873 96 96 */ 97 97 vmSetErrorCopy(pVM, rc, RT_SRC_POS_ARGS, pszFormat, args); 98 99 # ifdef IN_RC 100 VMMGCCallHost(pVM, VMMCALLHOST_VM_SET_ERROR, 0); 101 # elif defined(IN_RING0) 102 VMMR0CallHost(pVM, VMMCALLHOST_VM_SET_ERROR, 0); 103 # else 104 # endif 98 VMMRZCallRing3NoCpu(pVM, VMMCALLHOST_VM_SET_ERROR, 0); 105 99 #endif 106 100 return rc; … … 287 281 vmSetRuntimeErrorCopy(pVM, fFlags, pszErrorId, pszFormat, va); 288 282 289 # ifdef IN_RC 290 int rc = VMMGCCallHost(pVM, VMMCALLHOST_VM_SET_RUNTIME_ERROR, 0); 291 # else 292 int rc = VMMR0CallHost(pVM, VMMCALLHOST_VM_SET_RUNTIME_ERROR, 0); 293 # endif 283 int rc = VMMRZCallRing3NoCpu(pVM, VMMCALLHOST_VM_SET_RUNTIME_ERROR, 0); 294 284 #endif 295 285 -
trunk/src/VBox/VMM/VMMGC/VMMGC.cpp
r20871 r20873 176 176 PVM pVM = &g_VM; 177 177 NOREF(pLogger); 178 return VMMGCCallHost(pVM, VMMCALLHOST_VMM_LOGGER_FLUSH, 0); 178 if (pVM->vmm.s.fRCLoggerFlushingDisabled) 179 return VINF_SUCCESS; /* fail quietly. */ 180 return VMMRZCallRing3NoCpu(pVM, VMMCALLHOST_VMM_LOGGER_FLUSH, 0); 179 181 } 180 182 … … 192 194 if (pVM->vmm.s.fRCLoggerFlushingDisabled) 193 195 return; /* fail quietly. */ 194 VMM GCCallHost(pVM, VMMCALLHOST_VMM_LOGGER_FLUSH, 0);196 VMMRZCallRing3NoCpu(pVM, VMMCALLHOST_VMM_LOGGER_FLUSH, 0); 195 197 } 196 198 } … … 206 208 { 207 209 pVM->vmm.s.pfnGuestToHostRC(rc); 208 }209 210 211 /**212 * Calls the ring-3 host code.213 *214 * @returns VBox status code of the ring-3 call.215 * @param pVM The VM handle.216 * @param enmOperation The operation.217 * @param uArg The argument to the operation.218 *219 * @deprecated Use VMMRZCallRing3.220 */221 VMMRCDECL(int) VMMGCCallHost(PVM pVM, VMMCALLHOST enmOperation, uint64_t uArg)222 {223 return VMMRZCallRing3(pVM, VMMGetCpu0(pVM), enmOperation, uArg);224 210 } 225 211
Note:
See TracChangeset
for help on using the changeset viewer.