- Timestamp:
- Jun 24, 2009 2:19:29 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/pdmcritsect.h
r20753 r20874 58 58 VMMDECL(int) PDMCritSectEnter(PPDMCRITSECT pCritSect, int rcBusy); 59 59 VMMDECL(int) PDMCritSectTryEnter(PPDMCRITSECT pCritSect); 60 VMMR3DECL(int) PDMR3CritSectEnterEx(PPDMCRITSECT pCritSect, bool fCall Host);60 VMMR3DECL(int) PDMR3CritSectEnterEx(PPDMCRITSECT pCritSect, bool fCallRing3); 61 61 VMMDECL(void) PDMCritSectLeave(PPDMCRITSECT pCritSect); 62 62 VMMDECL(bool) PDMCritSectIsOwner(PCPDMCRITSECT pCritSect); -
trunk/include/VBox/vmm.h
r20873 r20874 77 77 78 78 /** 79 * VMM GCCallHostoperations.80 */ 81 typedef enum VMMCALL HOST79 * VMMRZCallRing3 operations. 80 */ 81 typedef enum VMMCALLRING3 82 82 { 83 83 /** Invalid operation. */ 84 VMMCALL HOST_INVALID = 0,84 VMMCALLRING3_INVALID = 0, 85 85 /** Acquire the PDM lock. */ 86 VMMCALL HOST_PDM_LOCK,86 VMMCALLRING3_PDM_LOCK, 87 87 /** Call PDMR3QueueFlushWorker. */ 88 VMMCALL HOST_PDM_QUEUE_FLUSH,88 VMMCALLRING3_PDM_QUEUE_FLUSH, 89 89 /** Acquire the PGM lock. */ 90 VMMCALL HOST_PGM_LOCK,90 VMMCALLRING3_PGM_LOCK, 91 91 /** Grow the PGM shadow page pool. */ 92 VMMCALL HOST_PGM_POOL_GROW,92 VMMCALLRING3_PGM_POOL_GROW, 93 93 /** Maps a chunk into ring-3. */ 94 VMMCALL HOST_PGM_MAP_CHUNK,94 VMMCALLRING3_PGM_MAP_CHUNK, 95 95 /** Allocates more handy pages. */ 96 VMMCALL HOST_PGM_ALLOCATE_HANDY_PAGES,96 VMMCALLRING3_PGM_ALLOCATE_HANDY_PAGES, 97 97 /** Acquire the MM hypervisor heap lock. */ 98 VMMCALL HOST_MMHYPER_LOCK,98 VMMCALLRING3_MMHYPER_LOCK, 99 99 /** Replay the REM handler notifications. */ 100 VMMCALL HOST_REM_REPLAY_HANDLER_NOTIFICATIONS,100 VMMCALLRING3_REM_REPLAY_HANDLER_NOTIFICATIONS, 101 101 /** Flush the GC/R0 logger. */ 102 VMMCALL HOST_VMM_LOGGER_FLUSH,102 VMMCALLRING3_VMM_LOGGER_FLUSH, 103 103 /** Set the VM error message. */ 104 VMMCALL HOST_VM_SET_ERROR,104 VMMCALLRING3_VM_SET_ERROR, 105 105 /** Set the VM runtime error message. */ 106 VMMCALL HOST_VM_SET_RUNTIME_ERROR,106 VMMCALLRING3_VM_SET_RUNTIME_ERROR, 107 107 /** Signal a ring 0 assertion. */ 108 VMMCALL HOST_VM_R0_ASSERTION,108 VMMCALLRING3_VM_R0_ASSERTION, 109 109 /** Ring switch to force preemption. */ 110 VMMCALL HOST_VM_R0_PREEMPT,110 VMMCALLRING3_VM_R0_PREEMPT, 111 111 /** The usual 32-bit hack. */ 112 VMMCALL HOST_32BIT_HACK = 0x7fffffff113 } VMMCALL HOST;112 VMMCALLRING3_32BIT_HACK = 0x7fffffff 113 } VMMCALLRING3; 114 114 115 115 /** … … 351 351 VMMR0DECL(int) VMMR0EntryEx(PVM pVM, VMCPUID idCpu, VMMR0OPERATION enmOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION); 352 352 VMMR0DECL(int) VMMR0TermVM(PVM pVM, PGVM pGVM); 353 VMMR0DECL(int) VMMR0CallHost(PVM pVM, VMMCALLHOST enmOperation, uint64_t uArg);354 353 355 354 #ifdef LOG_ENABLED … … 380 379 * @{ 381 380 */ 382 VMMRZDECL(int) VMMRZCallRing3(PVM pVM, PVMCPU pVCpu, VMMCALL HOSTenmOperation, uint64_t uArg);383 VMMRZDECL(int) VMMRZCallRing3NoCpu(PVM pVM, VMMCALL HOSTenmOperation, uint64_t uArg);381 VMMRZDECL(int) VMMRZCallRing3(PVM pVM, PVMCPU pVCpu, VMMCALLRING3 enmOperation, uint64_t uArg); 382 VMMRZDECL(int) VMMRZCallRing3NoCpu(PVM pVM, VMMCALLRING3 enmOperation, uint64_t uArg); 384 383 VMMRZDECL(void) VMMRZCallRing3Disable(PVMCPU pVCpu); 385 384 VMMRZDECL(void) VMMRZCallRing3Enable(PVMCPU pVCpu); -
trunk/src/VBox/VMM/MMHyper.cpp
r20868 r20874 344 344 345 345 /** 346 * Service a VMMCALL HOST_MMHYPER_LOCK call.346 * Service a VMMCALLRING3_MMHYPER_LOCK call. 347 347 * 348 348 * @returns VBox status code. -
trunk/src/VBox/VMM/PDM.cpp
r20838 r20874 1380 1380 1381 1381 /** 1382 * Service a VMMCALL HOST_PDM_LOCK call.1382 * Service a VMMCALLRING3_PDM_LOCK call. 1383 1383 * 1384 1384 * @returns VBox status code. -
trunk/src/VBox/VMM/PGM.cpp
r20864 r20874 3197 3197 3198 3198 /** 3199 * Service a VMMCALL HOST_PGM_LOCK call.3199 * Service a VMMCALLRING3_PGM_LOCK call. 3200 3200 * 3201 3201 * @returns VBox status code. -
trunk/src/VBox/VMM/PGMPhys.cpp
r20864 r20874 2984 2984 2985 2985 /** 2986 * For VMMCALL HOST_PGM_MAP_CHUNK, considered internal.2986 * For VMMCALLRING3_PGM_MAP_CHUNK, considered internal. 2987 2987 * 2988 2988 * @returns see pgmR3PhysChunkMap. … … 3020 3020 3021 3021 /** 3022 * Response to VM_FF_PGM_NEED_HANDY_PAGES and VMMCALL HOST_PGM_ALLOCATE_HANDY_PAGES.3022 * Response to VM_FF_PGM_NEED_HANDY_PAGES and VMMCALLRING3_PGM_ALLOCATE_HANDY_PAGES. 3023 3023 * 3024 3024 * This function will also work the VM_FF_PGM_NO_MEMORY force action flag, to -
trunk/src/VBox/VMM/VMM.cpp
r20869 r20874 386 386 387 387 STAM_REG(pVM, &pVM->vmm.s.StatRZRetCallHost, STAMTYPE_COUNTER, "/VMM/RZCallR3/Misc", STAMUNIT_OCCURENCES, "Number of Other ring-3 calls."); 388 STAM_REG(pVM, &pVM->vmm.s.StatRZCallPDMLock, STAMTYPE_COUNTER, "/VMM/RZCallR3/PDMLock", STAMUNIT_OCCURENCES, "Number of VMMCALL HOST_PDM_LOCK calls.");389 STAM_REG(pVM, &pVM->vmm.s.StatRZCallPDMQueueFlush, STAMTYPE_COUNTER, "/VMM/RZCallR3/PDMQueueFlush", STAMUNIT_OCCURENCES, "Number of VMMCALL HOST_PDM_QUEUE_FLUSH calls.");390 STAM_REG(pVM, &pVM->vmm.s.StatRZCallPGMLock, STAMTYPE_COUNTER, "/VMM/RZCallR3/PGMLock", STAMUNIT_OCCURENCES, "Number of VMMCALL HOST_PGM_LOCK calls.");391 STAM_REG(pVM, &pVM->vmm.s.StatRZCallPGMPoolGrow, STAMTYPE_COUNTER, "/VMM/RZCallR3/PGMPoolGrow", STAMUNIT_OCCURENCES, "Number of VMMCALL HOST_PGM_POOL_GROW calls.");392 STAM_REG(pVM, &pVM->vmm.s.StatRZCallPGMMapChunk, STAMTYPE_COUNTER, "/VMM/RZCallR3/PGMMapChunk", STAMUNIT_OCCURENCES, "Number of VMMCALL HOST_PGM_MAP_CHUNK calls.");393 STAM_REG(pVM, &pVM->vmm.s.StatRZCallPGMAllocHandy, STAMTYPE_COUNTER, "/VMM/RZCallR3/PGMAllocHandy", STAMUNIT_OCCURENCES, "Number of VMMCALL HOST_PGM_ALLOCATE_HANDY_PAGES calls.");394 STAM_REG(pVM, &pVM->vmm.s.StatRZCallRemReplay, STAMTYPE_COUNTER, "/VMM/RZCallR3/REMReplay", STAMUNIT_OCCURENCES, "Number of VMMCALL HOST_REM_REPLAY_HANDLER_NOTIFICATIONS calls.");395 STAM_REG(pVM, &pVM->vmm.s.StatRZCallLogFlush, STAMTYPE_COUNTER, "/VMM/RZCallR3/VMMLogFlush", STAMUNIT_OCCURENCES, "Number of VMMCALL HOST_VMM_LOGGER_FLUSH calls.");396 STAM_REG(pVM, &pVM->vmm.s.StatRZCallVMSetError, STAMTYPE_COUNTER, "/VMM/RZCallR3/VMSetError", STAMUNIT_OCCURENCES, "Number of VMMCALL HOST_VM_SET_ERROR calls.");397 STAM_REG(pVM, &pVM->vmm.s.StatRZCallVMSetRuntimeError, STAMTYPE_COUNTER, "/VMM/RZCallR3/VMRuntimeError", STAMUNIT_OCCURENCES, "Number of VMMCALL HOST_VM_SET_RUNTIME_ERROR calls.");388 STAM_REG(pVM, &pVM->vmm.s.StatRZCallPDMLock, STAMTYPE_COUNTER, "/VMM/RZCallR3/PDMLock", STAMUNIT_OCCURENCES, "Number of VMMCALLRING3_PDM_LOCK calls."); 389 STAM_REG(pVM, &pVM->vmm.s.StatRZCallPDMQueueFlush, STAMTYPE_COUNTER, "/VMM/RZCallR3/PDMQueueFlush", STAMUNIT_OCCURENCES, "Number of VMMCALLRING3_PDM_QUEUE_FLUSH calls."); 390 STAM_REG(pVM, &pVM->vmm.s.StatRZCallPGMLock, STAMTYPE_COUNTER, "/VMM/RZCallR3/PGMLock", STAMUNIT_OCCURENCES, "Number of VMMCALLRING3_PGM_LOCK calls."); 391 STAM_REG(pVM, &pVM->vmm.s.StatRZCallPGMPoolGrow, STAMTYPE_COUNTER, "/VMM/RZCallR3/PGMPoolGrow", STAMUNIT_OCCURENCES, "Number of VMMCALLRING3_PGM_POOL_GROW calls."); 392 STAM_REG(pVM, &pVM->vmm.s.StatRZCallPGMMapChunk, STAMTYPE_COUNTER, "/VMM/RZCallR3/PGMMapChunk", STAMUNIT_OCCURENCES, "Number of VMMCALLRING3_PGM_MAP_CHUNK calls."); 393 STAM_REG(pVM, &pVM->vmm.s.StatRZCallPGMAllocHandy, STAMTYPE_COUNTER, "/VMM/RZCallR3/PGMAllocHandy", STAMUNIT_OCCURENCES, "Number of VMMCALLRING3_PGM_ALLOCATE_HANDY_PAGES calls."); 394 STAM_REG(pVM, &pVM->vmm.s.StatRZCallRemReplay, STAMTYPE_COUNTER, "/VMM/RZCallR3/REMReplay", STAMUNIT_OCCURENCES, "Number of VMMCALLRING3_REM_REPLAY_HANDLER_NOTIFICATIONS calls."); 395 STAM_REG(pVM, &pVM->vmm.s.StatRZCallLogFlush, STAMTYPE_COUNTER, "/VMM/RZCallR3/VMMLogFlush", STAMUNIT_OCCURENCES, "Number of VMMCALLRING3_VMM_LOGGER_FLUSH calls."); 396 STAM_REG(pVM, &pVM->vmm.s.StatRZCallVMSetError, STAMTYPE_COUNTER, "/VMM/RZCallR3/VMSetError", STAMUNIT_OCCURENCES, "Number of VMMCALLRING3_VM_SET_ERROR calls."); 397 STAM_REG(pVM, &pVM->vmm.s.StatRZCallVMSetRuntimeError, STAMTYPE_COUNTER, "/VMM/RZCallR3/VMRuntimeError", STAMUNIT_OCCURENCES, "Number of VMMCALLRING3_VM_SET_RUNTIME_ERROR calls."); 398 398 399 399 #ifdef VBOX_WITH_STATISTICS … … 1862 1862 * Acquire the PDM lock. 1863 1863 */ 1864 case VMMCALL HOST_PDM_LOCK:1864 case VMMCALLRING3_PDM_LOCK: 1865 1865 { 1866 1866 pVCpu->vmm.s.rcCallHost = PDMR3LockCall(pVM); … … 1871 1871 * Flush a PDM queue. 1872 1872 */ 1873 case VMMCALL HOST_PDM_QUEUE_FLUSH:1873 case VMMCALLRING3_PDM_QUEUE_FLUSH: 1874 1874 { 1875 1875 PDMR3QueueFlushWorker(pVM, NULL); … … 1881 1881 * Grow the PGM pool. 1882 1882 */ 1883 case VMMCALL HOST_PGM_POOL_GROW:1883 case VMMCALLRING3_PGM_POOL_GROW: 1884 1884 { 1885 1885 pVCpu->vmm.s.rcCallHost = PGMR3PoolGrow(pVM); … … 1890 1890 * Maps an page allocation chunk into ring-3 so ring-0 can use it. 1891 1891 */ 1892 case VMMCALL HOST_PGM_MAP_CHUNK:1892 case VMMCALLRING3_PGM_MAP_CHUNK: 1893 1893 { 1894 1894 pVCpu->vmm.s.rcCallHost = PGMR3PhysChunkMap(pVM, pVCpu->vmm.s.u64CallHostArg); … … 1899 1899 * Allocates more handy pages. 1900 1900 */ 1901 case VMMCALL HOST_PGM_ALLOCATE_HANDY_PAGES:1901 case VMMCALLRING3_PGM_ALLOCATE_HANDY_PAGES: 1902 1902 { 1903 1903 pVCpu->vmm.s.rcCallHost = PGMR3PhysAllocateHandyPages(pVM); … … 1908 1908 * Acquire the PGM lock. 1909 1909 */ 1910 case VMMCALL HOST_PGM_LOCK:1910 case VMMCALLRING3_PGM_LOCK: 1911 1911 { 1912 1912 pVCpu->vmm.s.rcCallHost = PGMR3LockCall(pVM); … … 1917 1917 * Acquire the MM hypervisor heap lock. 1918 1918 */ 1919 case VMMCALL HOST_MMHYPER_LOCK:1919 case VMMCALLRING3_MMHYPER_LOCK: 1920 1920 { 1921 1921 pVCpu->vmm.s.rcCallHost = MMR3LockCall(pVM); … … 1926 1926 * Flush REM handler notifications. 1927 1927 */ 1928 case VMMCALL HOST_REM_REPLAY_HANDLER_NOTIFICATIONS:1928 case VMMCALLRING3_REM_REPLAY_HANDLER_NOTIFICATIONS: 1929 1929 { 1930 1930 REMR3ReplayHandlerNotifications(pVM); … … 1937 1937 * tests in the loops. 1938 1938 */ 1939 case VMMCALL HOST_VMM_LOGGER_FLUSH:1939 case VMMCALLRING3_VMM_LOGGER_FLUSH: 1940 1940 pVCpu->vmm.s.rcCallHost = VINF_SUCCESS; 1941 1941 LogAlways(("*FLUSH*\n")); … … 1945 1945 * Set the VM error message. 1946 1946 */ 1947 case VMMCALL HOST_VM_SET_ERROR:1947 case VMMCALLRING3_VM_SET_ERROR: 1948 1948 VMR3SetErrorWorker(pVM); 1949 1949 pVCpu->vmm.s.rcCallHost = VINF_SUCCESS; … … 1953 1953 * Set the VM runtime error message. 1954 1954 */ 1955 case VMMCALL HOST_VM_SET_RUNTIME_ERROR:1955 case VMMCALLRING3_VM_SET_RUNTIME_ERROR: 1956 1956 pVCpu->vmm.s.rcCallHost = VMR3SetRuntimeErrorWorker(pVM); 1957 1957 break; … … 1961 1961 * Cancel the longjmp operation that's in progress. 1962 1962 */ 1963 case VMMCALL HOST_VM_R0_ASSERTION:1964 pVCpu->vmm.s.enmCallHostOperation = VMMCALL HOST_INVALID;1963 case VMMCALLRING3_VM_R0_ASSERTION: 1964 pVCpu->vmm.s.enmCallHostOperation = VMMCALLRING3_INVALID; 1965 1965 pVCpu->vmm.s.CallHostR0JmpBuf.fInRing3Call = false; 1966 1966 #ifdef RT_ARCH_X86 … … 1976 1976 * A forced switch to ring 0 for preemption purposes. 1977 1977 */ 1978 case VMMCALL HOST_VM_R0_PREEMPT:1978 case VMMCALLRING3_VM_R0_PREEMPT: 1979 1979 pVCpu->vmm.s.rcCallHost = VINF_SUCCESS; 1980 1980 break; … … 1985 1985 } 1986 1986 1987 pVCpu->vmm.s.enmCallHostOperation = VMMCALL HOST_INVALID;1987 pVCpu->vmm.s.enmCallHostOperation = VMMCALLRING3_INVALID; 1988 1988 return VINF_SUCCESS; 1989 1989 } -
trunk/src/VBox/VMM/VMMAll/MMAllHyper.cpp
r20873 r20874 171 171 #if defined(IN_RC) || defined(IN_RING0) 172 172 if (rc == VERR_SEM_BUSY) 173 rc = VMMRZCallRing3NoCpu(pVM, VMMCALL HOST_MMHYPER_LOCK, 0);173 rc = VMMRZCallRing3NoCpu(pVM, VMMCALLRING3_MMHYPER_LOCK, 0); 174 174 #endif 175 175 AssertRC(rc); -
trunk/src/VBox/VMM/VMMAll/PDMAll.cpp
r20873 r20874 328 328 int rc = PDMCritSectEnter(&pVM->pdm.s.CritSect, VERR_GENERAL_FAILURE); 329 329 if (rc == VERR_GENERAL_FAILURE) 330 rc = VMMRZCallRing3NoCpu(pVM, VMMCALL HOST_PDM_LOCK, 0);330 rc = VMMRZCallRing3NoCpu(pVM, VMMCALLRING3_PDM_LOCK, 0); 331 331 #endif 332 332 AssertRC(rc); -
trunk/src/VBox/VMM/VMMAll/PDMAllCritSect.cpp
r20755 r20874 284 284 * 285 285 * @param pCritSect The PDM critical section to enter. 286 * @param fCall Host Whether this is a VMMGCCallHost() or VMMR0CallHost()request.287 */ 288 VMMR3DECL(int) PDMR3CritSectEnterEx(PPDMCRITSECT pCritSect, bool fCall Host)286 * @param fCallRing3 Whether this is a VMMRZCallRing3()request. 287 */ 288 VMMR3DECL(int) PDMR3CritSectEnterEx(PPDMCRITSECT pCritSect, bool fCallRing3) 289 289 { 290 290 int rc = PDMCritSectEnter(pCritSect, VERR_INTERNAL_ERROR); 291 291 if ( rc == VINF_SUCCESS 292 && fCall Host292 && fCallRing3 293 293 && pCritSect->s.Core.Strict.ThreadOwner != NIL_RTTHREAD) 294 294 { -
trunk/src/VBox/VMM/VMMAll/PDMAllQueue.cpp
r20873 r20874 183 183 Assert(pQueue->CTX_SUFF(pVM)); 184 184 pVM->pdm.s.CTX_SUFF(pQueueFlush) = pQueue; 185 VMMRZCallRing3NoCpu(pVM, VMMCALL HOST_PDM_QUEUE_FLUSH, (uintptr_t)pQueue);185 VMMRZCallRing3NoCpu(pVM, VMMCALLRING3_PDM_QUEUE_FLUSH, (uintptr_t)pQueue); 186 186 187 187 #else /* IN_RING3: */ -
trunk/src/VBox/VMM/VMMAll/PGMAll.cpp
r20873 r20874 2079 2079 #if defined(IN_RC) || defined(IN_RING0) 2080 2080 if (rc == VERR_SEM_BUSY) 2081 rc = VMMRZCallRing3NoCpu(pVM, VMMCALL HOST_PGM_LOCK, 0);2081 rc = VMMRZCallRing3NoCpu(pVM, VMMCALLRING3_PGM_LOCK, 0); 2082 2082 #endif 2083 2083 AssertMsg(rc == VINF_SUCCESS, ("%Rrc\n", rc)); -
trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp
r20873 r20874 272 272 int rc = PGMR3PhysAllocateHandyPages(pVM); 273 273 #else 274 int rc = VMMRZCallRing3NoCpu(pVM, VMMCALL HOST_PGM_ALLOCATE_HANDY_PAGES, 0);274 int rc = VMMRZCallRing3NoCpu(pVM, VMMCALLRING3_PGM_ALLOCATE_HANDY_PAGES, 0); 275 275 #endif 276 276 if (RT_UNLIKELY(rc != VINF_SUCCESS)) … … 550 550 { 551 551 # ifdef IN_RING0 552 int rc = VMMR 0CallHost(pVM, VMMCALLHOST_PGM_MAP_CHUNK, idChunk);552 int rc = VMMRZCallRing3NoCpu(pVM, VMMCALLRING3_PGM_MAP_CHUNK, idChunk); 553 553 AssertRCReturn(rc, rc); 554 554 pMap = (PPGMCHUNKR3MAP)RTAvlU32Get(&pVM->pgm.s.ChunkR3Map.pTree, idChunk); … … 668 668 { 669 669 #ifdef IN_RING0 670 int rc = VMMR 0CallHost(pVM, VMMCALLHOST_PGM_MAP_CHUNK, idChunk);670 int rc = VMMRZCallRing3NoCpu(pVM, VMMCALLRING3_PGM_MAP_CHUNK, idChunk); 671 671 AssertRCReturn(rc, rc); 672 672 pMap = (PPGMCHUNKR3MAP)RTAvlU32Get(&pVM->pgm.s.ChunkR3Map.pTree, idChunk); -
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r20873 r20874 4009 4009 int rc = PGMR3PoolGrow(pVM); 4010 4010 #else 4011 int rc = VMMRZCallRing3NoCpu(pVM, VMMCALL HOST_PGM_POOL_GROW, 0);4011 int rc = VMMRZCallRing3NoCpu(pVM, VMMCALLRING3_PGM_POOL_GROW, 0); 4012 4012 #endif 4013 4013 if (RT_FAILURE(rc)) -
trunk/src/VBox/VMM/VMMAll/REMAll.cpp
r20871 r20874 102 102 Assert(cFlushes++ != 128); 103 103 AssertFatal(cFlushes < _1M); 104 VMMRZCallRing3NoCpu(pVM, VMMCALL HOST_REM_REPLAY_HANDLER_NOTIFICATIONS, 0);104 VMMRZCallRing3NoCpu(pVM, VMMCALLRING3_REM_REPLAY_HANDLER_NOTIFICATIONS, 0); 105 105 idxFree = ASMAtomicUoReadU32(&pVM->rem.s.idxFreeList); 106 106 } while (idxFree == (uint32_t)-1); … … 227 227 228 228 /* Ok, we gotta flush them. */ 229 VMMRZCallRing3NoCpu(pVM, VMMCALL HOST_REM_REPLAY_HANDLER_NOTIFICATIONS, 0);229 VMMRZCallRing3NoCpu(pVM, VMMCALLRING3_REM_REPLAY_HANDLER_NOTIFICATIONS, 0); 230 230 } 231 231 #endif /* IN_RC */ -
trunk/src/VBox/VMM/VMMAll/VMAll.cpp
r20873 r20874 96 96 */ 97 97 vmSetErrorCopy(pVM, rc, RT_SRC_POS_ARGS, pszFormat, args); 98 VMMRZCallRing3NoCpu(pVM, VMMCALL HOST_VM_SET_ERROR, 0);98 VMMRZCallRing3NoCpu(pVM, VMMCALLRING3_VM_SET_ERROR, 0); 99 99 #endif 100 100 return rc; … … 281 281 vmSetRuntimeErrorCopy(pVM, fFlags, pszErrorId, pszFormat, va); 282 282 283 int rc = VMMRZCallRing3NoCpu(pVM, VMMCALL HOST_VM_SET_RUNTIME_ERROR, 0);283 int rc = VMMRZCallRing3NoCpu(pVM, VMMCALLRING3_VM_SET_RUNTIME_ERROR, 0); 284 284 #endif 285 285 -
trunk/src/VBox/VMM/VMMGC/VMMGC.cpp
r20873 r20874 178 178 if (pVM->vmm.s.fRCLoggerFlushingDisabled) 179 179 return VINF_SUCCESS; /* fail quietly. */ 180 return VMMRZCallRing3NoCpu(pVM, VMMCALL HOST_VMM_LOGGER_FLUSH, 0);180 return VMMRZCallRing3NoCpu(pVM, VMMCALLRING3_VMM_LOGGER_FLUSH, 0); 181 181 } 182 182 … … 194 194 if (pVM->vmm.s.fRCLoggerFlushingDisabled) 195 195 return; /* fail quietly. */ 196 VMMRZCallRing3NoCpu(pVM, VMMCALL HOST_VMM_LOGGER_FLUSH, 0);196 VMMRZCallRing3NoCpu(pVM, VMMCALLRING3_VMM_LOGGER_FLUSH, 0); 197 197 } 198 198 } -
trunk/src/VBox/VMM/VMMInternal.h
r20871 r20874 406 406 uint32_t cCallRing3Disabled; 407 407 /** The pending operation. */ 408 VMMCALL HOSTenmCallHostOperation;408 VMMCALLRING3 enmCallHostOperation; 409 409 /** The result of the last operation. */ 410 410 int32_t rcCallHost; … … 511 511 * The setjmp variant used for calling Ring-3. 512 512 * 513 * This differs from the normal setjmp in that it will resume VMMR 0CallHostif we're513 * This differs from the normal setjmp in that it will resume VMMRZCallRing3 if we're 514 514 * in the middle of a ring-3 call. Another differences is the function pointer and 515 515 * argument. This has to do with resuming code and the stack frame of the caller. … … 544 544 545 545 /** 546 * Worker for VMMR 0CallHost.546 * Worker for VMMRZCallRing3. 547 547 * This will save the stack and registers. 548 548 * -
trunk/src/VBox/VMM/VMMR0/PGMR0DynMap.cpp
r19403 r20874 1831 1831 g_pPGMR0DynMap->cLoad, g_pPGMR0DynMap->cMaxLoad, g_pPGMR0DynMap->cPages, g_pPGMR0DynMap->cGuardPages); 1832 1832 if (!g_fPGMR0DynMapTestRunning) 1833 VMMR 0CallHost(pVM, VMMCALLHOST_VM_R0_ASSERTION, 0);1833 VMMRZCallRing3NoCpu(pVM, VMMCALLRING3_VM_R0_ASSERTION, 0); 1834 1834 *ppv = NULL; 1835 1835 return VERR_PGM_DYNMAP_FAILED; … … 1927 1927 AssertMsg2("PGMDynMapHCPage: set is full!\n"); 1928 1928 if (!g_fPGMR0DynMapTestRunning) 1929 VMMR 0CallHost(pVM, VMMCALLHOST_VM_R0_ASSERTION, 0);1929 VMMRZCallRing3NoCpu(pVM, VMMCALLRING3_VM_R0_ASSERTION, 0); 1930 1930 *ppv = NULL; 1931 1931 return VERR_PGM_DYNMAP_FULL_SET; -
trunk/src/VBox/VMM/VMMR0/VMMR0.cpp
r20871 r20874 307 307 308 308 309 /**310 * Calls the ring-3 host code.311 *312 * @returns VBox status code of the ring-3 call.313 * @param pVM The VM handle.314 * @param enmOperation The operation.315 * @param uArg The argument to the operation.316 *317 * @deprecated Use VMMRZCallRing3.318 */319 VMMR0DECL(int) VMMR0CallHost(PVM pVM, VMMCALLHOST enmOperation, uint64_t uArg)320 {321 return VMMRZCallRing3(pVM, VMMGetCpu(pVM), enmOperation, uArg);322 }323 324 325 309 #ifdef VBOX_WITH_STATISTICS 326 310 /** … … 442 426 switch (pVCpu->vmm.s.enmCallHostOperation) 443 427 { 444 case VMMCALL HOST_PDM_LOCK:428 case VMMCALLRING3_PDM_LOCK: 445 429 STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallPDMLock); 446 430 break; 447 case VMMCALL HOST_PDM_QUEUE_FLUSH:431 case VMMCALLRING3_PDM_QUEUE_FLUSH: 448 432 STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallPDMQueueFlush); 449 433 break; 450 case VMMCALL HOST_PGM_POOL_GROW:434 case VMMCALLRING3_PGM_POOL_GROW: 451 435 STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallPGMPoolGrow); 452 436 break; 453 case VMMCALL HOST_PGM_LOCK:437 case VMMCALLRING3_PGM_LOCK: 454 438 STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallPGMLock); 455 439 break; 456 case VMMCALL HOST_PGM_MAP_CHUNK:440 case VMMCALLRING3_PGM_MAP_CHUNK: 457 441 STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallPGMMapChunk); 458 442 break; 459 case VMMCALL HOST_PGM_ALLOCATE_HANDY_PAGES:443 case VMMCALLRING3_PGM_ALLOCATE_HANDY_PAGES: 460 444 STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallPGMAllocHandy); 461 445 break; 462 case VMMCALL HOST_REM_REPLAY_HANDLER_NOTIFICATIONS:446 case VMMCALLRING3_REM_REPLAY_HANDLER_NOTIFICATIONS: 463 447 STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallRemReplay); 464 448 break; 465 case VMMCALL HOST_VMM_LOGGER_FLUSH:449 case VMMCALLRING3_VMM_LOGGER_FLUSH: 466 450 STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallLogFlush); 467 451 break; 468 case VMMCALL HOST_VM_SET_ERROR:452 case VMMCALLRING3_VM_SET_ERROR: 469 453 STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallVMSetError); 470 454 break; 471 case VMMCALL HOST_VM_SET_RUNTIME_ERROR:455 case VMMCALLRING3_VM_SET_RUNTIME_ERROR: 472 456 STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallVMSetRuntimeError); 473 457 break; 474 case VMMCALL HOST_VM_R0_ASSERTION:458 case VMMCALLRING3_VM_R0_ASSERTION: 475 459 default: 476 460 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetCallHost); … … 1201 1185 return; 1202 1186 } 1203 VMMR 0CallHost(pVM, VMMCALLHOST_VMM_LOGGER_FLUSH, 0);1187 VMMRZCallRing3(pVM, pVCpu, VMMCALLRING3_VMM_LOGGER_FLUSH, 0); 1204 1188 #endif 1205 1189 } … … 1288 1272 #endif 1289 1273 { 1290 int rc = VMMR 0CallHost(pVM, VMMCALLHOST_VM_R0_ASSERTION, 0);1274 int rc = VMMRZCallRing3(pVM, pVCpu, VMMCALLRING3_VM_R0_ASSERTION, 0); 1291 1275 return RT_FAILURE_NP(rc); 1292 1276 } -
trunk/src/VBox/VMM/VMMR0/VMMR0JmpA-amd64.asm
r20545 r20874 46 46 ; The setjmp variant used for calling Ring-3. 47 47 ; 48 ; This differs from the normal setjmp in that it will resume VMMR 0CallHostif we're48 ; This differs from the normal setjmp in that it will resume VMMRZCallRing3 if we're 49 49 ; in the middle of a ring-3 call. Another differences is the function pointer and 50 50 ; argument. This has to do with resuming code and the stack frame of the caller. … … 177 177 178 178 ; 179 ; Resume VMMR 0CallHostthe call.179 ; Resume VMMRZCallRing3 the call. 180 180 ; 181 181 .resume: … … 240 240 241 241 ;; 242 ; Worker for VMMR 0CallHost.242 ; Worker for VMMRZCallRing3. 243 243 ; This will save the stack and registers. 244 244 ; -
trunk/src/VBox/VMM/VMMR0/VMMR0JmpA-x86.asm
r20548 r20874 46 46 ; The setjmp variant used for calling Ring-3. 47 47 ; 48 ; This differs from the normal setjmp in that it will resume VMMR 0CallHostif we're48 ; This differs from the normal setjmp in that it will resume VMMRZCallRing3 if we're 49 49 ; in the middle of a ring-3 call. Another differences is the function pointer and 50 50 ; argument. This has to do with resuming code and the stack frame of the caller. … … 203 203 204 204 ; 205 ; Resume VMMR 0CallHostthe call.205 ; Resume VMMRZCallRing3 the call. 206 206 ; 207 207 .resume: … … 274 274 275 275 ;; 276 ; Worker for VMMR 0CallHost.276 ; Worker for VMMRZCallRing3. 277 277 ; This will save the stack and registers. 278 278 ; -
trunk/src/VBox/VMM/VMMRZ/VMMRZ.cpp
r20872 r20874 47 47 * @param uArg The argument to the operation. 48 48 */ 49 VMMRZDECL(int) VMMRZCallRing3(PVM pVM, PVMCPU pVCpu, VMMCALL HOSTenmOperation, uint64_t uArg)49 VMMRZDECL(int) VMMRZCallRing3(PVM pVM, PVMCPU pVCpu, VMMCALLRING3 enmOperation, uint64_t uArg) 50 50 { 51 51 VMCPU_ASSERT_EMT(pVCpu); … … 55 55 */ 56 56 if (RT_UNLIKELY( pVCpu->vmm.s.cCallRing3Disabled != 0 57 && enmOperation != VMMCALL HOST_VM_R0_ASSERTION))57 && enmOperation != VMMCALLRING3_VM_R0_ASSERTION)) 58 58 { 59 59 /* … … 67 67 * assertion host call. 68 68 */ 69 if (enmOperation != VMMCALL HOST_REM_REPLAY_HANDLER_NOTIFICATIONS)69 if (enmOperation != VMMCALLRING3_REM_REPLAY_HANDLER_NOTIFICATIONS) 70 70 return VERR_VMM_RING3_CALL_DISABLED; 71 71 #ifdef IN_RC 72 72 RTStrPrintf(g_szRTAssertMsg1, sizeof(pVM->vmm.s.szRing0AssertMsg1), 73 "VMMR 0CallHost: enmOperation=%d uArg=%#llx idCpu=%#x\n", enmOperation, uArg, pVCpu->idCpu);73 "VMMRZCallRing3: enmOperation=%d uArg=%#llx idCpu=%#x\n", enmOperation, uArg, pVCpu->idCpu); 74 74 #endif 75 75 RTStrPrintf(pVM->vmm.s.szRing0AssertMsg1, sizeof(pVM->vmm.s.szRing0AssertMsg1), 76 "VMMR 0CallHost: enmOperation=%d uArg=%#llx idCpu=%#x\n", enmOperation, uArg, pVCpu->idCpu);77 enmOperation = VMMCALL HOST_VM_R0_ASSERTION;76 "VMMRZCallRing3: enmOperation=%d uArg=%#llx idCpu=%#x\n", enmOperation, uArg, pVCpu->idCpu); 77 enmOperation = VMMCALLRING3_VM_R0_ASSERTION; 78 78 } 79 79 … … 109 109 * @param uArg The argument to the operation. 110 110 */ 111 VMMRZDECL(int) VMMRZCallRing3NoCpu(PVM pVM, VMMCALL HOSTenmOperation, uint64_t uArg)111 VMMRZDECL(int) VMMRZCallRing3NoCpu(PVM pVM, VMMCALLRING3 enmOperation, uint64_t uArg) 112 112 { 113 113 return VMMRZCallRing3(pVM, VMMGetCpu(pVM), enmOperation, uArg);
Note:
See TracChangeset
for help on using the changeset viewer.