Changeset 55895 in vbox
- Timestamp:
- May 17, 2015 7:42:38 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 100352
- Location:
- trunk
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pgm.h
r55891 r55895 178 178 * 179 179 * @returns VBox status code (appropriate for GC return). 180 * @param pVM VM Handle. 181 * @param uErrorCode CPU Error code. 182 * @param pRegFrame Trap register frame. 183 * @param pvFault The fault address (cr2). 184 * @param pvRange The base address of the handled virtual range. 185 * @param offRange The offset of the access into this range. 186 * (If it's a EIP range this is the EIP, if not it's pvFault.) 180 * @param pVM VM Handle. 181 * @param uErrorCode CPU Error code (X86_TRAP_PF_XXX). 182 * @param pRegFrame Trap register frame. 183 * @param pvFault The fault address (cr2). 184 * @param pvRange The base address of the handled virtual range. 185 * @param offRange The offset of the access into this range. 186 * (If it's a EIP range this is the EIP, if not it's pvFault.) 187 * @param pvUser User argument. 187 188 * @todo Add pVCpu, possibly replacing pVM. 188 189 */ 189 typedef DECLCALLBACK(int) FNPGMRCVIRTHANDLER(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, RTGCPTR pvRange, uintptr_t offRange); 190 typedef DECLCALLBACK(int) FNPGMRCVIRTPFHANDLER(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, 191 RTGCPTR pvRange, uintptr_t offRange, void *pvUser); 190 192 /** Pointer to PGM access callback. */ 191 typedef FNPGMRCVIRT HANDLER *PFNPGMRCVIRTHANDLER;193 typedef FNPGMRCVIRTPFHANDLER *PFNPGMRCVIRTPFHANDLER; 192 194 193 195 /** … … 208 210 * @todo Add pVCpu, possibly replacing pVM. 209 211 */ 210 typedef DECLCALLBACK(int) FNPGMR3VIRTHANDLER(PVM pVM, RTGCPTR GCPtr, void *pvPtr, void *pvBuf, size_t cbBuf, PGMACCESSTYPE enmAccessType, void *pvUser); 212 typedef DECLCALLBACK(int) FNPGMR3VIRTHANDLER(PVM pVM, RTGCPTR GCPtr, void *pvPtr, void *pvBuf, size_t cbBuf, 213 PGMACCESSTYPE enmAccessType, void *pvUser); 211 214 /** Pointer to PGM access callback. */ 212 215 typedef FNPGMR3VIRTHANDLER *PFNPGMR3VIRTHANDLER; … … 218 221 * @param pVM VM Handle. 219 222 * @param GCPtr The virtual address the guest has changed. 220 */ 221 typedef DECLCALLBACK(int) FNPGMR3VIRTINVALIDATE(PVM pVM, RTGCPTR GCPtr); 223 * @param pvUser User argument. 224 */ 225 typedef DECLCALLBACK(int) FNPGMR3VIRTINVALIDATE(PVM pVM, RTGCPTR GCPtr, void *pvUser); 222 226 /** Pointer to PGM invalidation callback. */ 223 227 typedef FNPGMR3VIRTINVALIDATE *PFNPGMR3VIRTINVALIDATE; … … 546 550 PFNPGMR3VIRTINVALIDATE pfnInvalidateR3, 547 551 PFNPGMR3VIRTHANDLER pfnHandlerR3, 548 RCPTRTYPE( PFNPGMRCVIRTHANDLER) pfnHandlerRC,552 RCPTRTYPE(FNPGMRCVIRTPFHANDLER) pfnPfHandlerRC, 549 553 const char *pszDesc, PPGMVIRTHANDLERTYPE phType); 550 554 VMMR3_INT_DECL(int) PGMR3HandlerVirtualTypeRegister(PVM pVM, PGMVIRTHANDLERKIND enmKind, bool fRelocUserRC, 551 555 PFNPGMR3VIRTINVALIDATE pfnInvalidateR3, 552 556 PFNPGMR3VIRTHANDLER pfnHandlerR3, 553 const char *psz HandlerRC, const char *pszModRC, const char *pszDesc,557 const char *pszPfHandlerRC, const char *pszModRC, const char *pszDesc, 554 558 PPGMVIRTHANDLERTYPE phType); 555 559 VMMR3_INT_DECL(int) PGMR3HandlerVirtualRegister(PVM pVM, PVMCPU pVCpu, PGMVIRTHANDLERTYPE hType, RTGCPTR GCPtr, -
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r55889 r55895 334 334 # ifdef IN_RC 335 335 STAM_PROFILE_START(&pCur->Stat, h); 336 RTGCPTR GCPtrStart = pCur->Core.Key; 337 CTX_MID(PFNPGM,VIRTHANDLER) pfnHandler = pCurType->CTX_SUFF(pfnHandler); 336 RTGCPTR GCPtrStart = pCur->Core.Key; 338 337 pgmUnlock(pVM); 339 338 *pfLockTaken = false; 340 339 341 rc = pfnHandler(pVM, uErr, pRegFrame, pvFault, GCPtrStart, pvFault - GCPtrStart); 340 rc = pCurType->CTX_SUFF(pfnPfHandler)(pVM, uErr, pRegFrame, pvFault, GCPtrStart, pvFault - GCPtrStart, 341 pCur->pvUserRC); 342 342 343 343 # ifdef VBOX_WITH_STATISTICS … … 374 374 # ifdef IN_RC 375 375 STAM_PROFILE_START(&pCur->Stat, h); 376 RTGCPTR GCPtrStart = pCur->Core.Key; 377 CTX_MID(PFNPGM,VIRTHANDLER) pfnHandler = pCurType->CTX_SUFF(pfnHandler); 376 RTGCPTR GCPtrStart = pCur->Core.Key; 378 377 pgmUnlock(pVM); 379 378 *pfLockTaken = false; … … 383 382 - (GCPtrStart & PAGE_OFFSET_MASK); 384 383 Assert(off < pCur->cb); 385 rc = p fnHandler(pVM, uErr, pRegFrame, pvFault, GCPtrStart, off);384 rc = pCurType->CTX_SUFF(pfnPfHandler)(pVM, uErr, pRegFrame, pvFault, GCPtrStart, off, pCur->pvUserRC); 386 385 387 386 # ifdef VBOX_WITH_STATISTICS … … 718 717 * Check if the fault address is in a virtual page access handler range. 719 718 */ 720 PPGMVIRTHANDLER pCur = (PPGMVIRTHANDLER)RTAvlroGCPtrRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->HyperVirtHandlers, pvFault); 719 PPGMVIRTHANDLER pCur = (PPGMVIRTHANDLER)RTAvlroGCPtrRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->HyperVirtHandlers, 720 pvFault); 721 721 if ( pCur 722 722 && pvFault - pCur->Core.Key < pCur->cb … … 727 727 PPGMVIRTHANDLERTYPEINT pCurType = PGMVIRTANDLER_GET_TYPE(pVM, pCur); 728 728 pgmUnlock(pVM); 729 rc = pCurType->CTX_SUFF(pfnHandler)(pVM, uErr, pRegFrame, pvFault, pCur->Core.Key, pvFault - pCur->Core.Key); 729 rc = pCurType->CTX_SUFF(pfnPfHandler)(pVM, uErr, pRegFrame, pvFault, pCur->Core.Key, pvFault - pCur->Core.Key, 730 pCur->pvUserRC); 730 731 pgmLock(pVM); 731 732 STAM_PROFILE_STOP(&pCur->Stat, h); … … 821 822 STAM_PROFILE_START(&pCur->Stat, h); 822 823 pgmUnlock(pVM); 823 rc = pCurType->CTX_SUFF(pfnHandler)(pVM, uErr, pRegFrame, pvFault, pCur->Core.Key, pvFault - pCur->Core.Key); 824 rc = pCurType->CTX_SUFF(pfnPfHandler)(pVM, uErr, pRegFrame, pvFault, pCur->Core.Key, pvFault - pCur->Core.Key, 825 pCur->pvUserRC); 824 826 pgmLock(pVM); 825 827 STAM_PROFILE_STOP(&pCur->Stat, h); -
trunk/src/VBox/VMM/VMMR3/CSAM.cpp
r55889 r55895 70 70 * Internal Functions * 71 71 *******************************************************************************/ 72 static DECLCALLBACK(int) csam r3Save(PVM pVM, PSSMHANDLE pSSM);73 static DECLCALLBACK(int) csam r3Load(PVM pVM, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass);74 static DECLCALLBACK(int) CSAMCodePageWriteHandler(PVM pVM, RTGCPTR GCPtr, void *pvPtr, void *pvBuf, size_t cbBuf, PGMACCESSTYPE enmAccessType, void *pvUser);75 static DECLCALLBACK(int) CSAMCodePageInvalidate(PVM pVM, RTGCPTR GCPtr);72 static DECLCALLBACK(int) csamR3Save(PVM pVM, PSSMHANDLE pSSM); 73 static DECLCALLBACK(int) csamR3Load(PVM pVM, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass); 74 static FNPGMR3VIRTHANDLER csamR3CodePageWriteHandler; 75 static FNPGMR3VIRTINVALIDATE csamR3CodePageInvalidate; 76 76 77 77 bool csamIsCodeScanned(PVM pVM, RTRCPTR pInstr, PCSAMPAGE *pPage); … … 84 84 PFN_CSAMR3ANALYSE pfnCSAMR3Analyse, void *pUserData, PCSAMP2GLOOKUPREC pCacheRec); 85 85 86 /** @todo Temporaryfor debugging. */87 static bool fInCSAMCodePageInvalidate = false;86 /** @todo "Temporary" for debugging. */ 87 static bool g_fInCsamR3CodePageInvalidate = false; 88 88 89 89 #ifdef VBOX_WITH_DEBUGGER … … 255 255 rc = PGMR3HandlerVirtualTypeRegister(pVM, PGMVIRTHANDLERKIND_WRITE, false /*fRelocUserRC*/, 256 256 NULL /*pfnInvalidateR3 */, 257 CSAMCodePageWriteHandler,258 " CSAMGCCodePageWriteHandler", NULL /*pszModRC*/,257 csamR3CodePageWriteHandler, 258 "csamRCCodePageWritePfHandler", NULL /*pszModRC*/, 259 259 "CSAM code page write handler", 260 260 &pVM->csam.s.hCodePageWriteType); 261 261 AssertLogRelRCReturn(rc, rc); 262 262 rc = PGMR3HandlerVirtualTypeRegister(pVM, PGMVIRTHANDLERKIND_WRITE, false /*fRelocUserRC*/, 263 CSAMCodePageInvalidate,264 CSAMCodePageWriteHandler,265 " CSAMGCCodePageWriteHandler", NULL /*pszModRC*/,263 csamR3CodePageInvalidate, 264 csamR3CodePageWriteHandler, 265 "csamRCCodePageWritePfHandler", NULL /*pszModRC*/, 266 266 "CSAM code page write and invlpg handler", 267 267 &pVM->csam.s.hCodePageWriteAndInvPgType); … … 273 273 rc = SSMR3RegisterInternal(pVM, "CSAM", 0, CSAM_SAVED_STATE_VERSION, sizeof(pVM->csam.s) + PAGE_SIZE*16, 274 274 NULL, NULL, NULL, 275 NULL, csam r3Save, NULL,276 NULL, csam r3Load, NULL);275 NULL, csamR3Save, NULL, 276 NULL, csamR3Load, NULL); 277 277 AssertRCReturn(rc, rc); 278 278 … … 540 540 * @param pSSM SSM operation handle. 541 541 */ 542 static DECLCALLBACK(int) csam r3Save(PVM pVM, PSSMHANDLE pSSM)542 static DECLCALLBACK(int) csamR3Save(PVM pVM, PSSMHANDLE pSSM) 543 543 { 544 544 CSAM csamInfo = pVM->csam.s; … … 562 562 AssertRCReturn(rc, rc); 563 563 564 for (unsigned i =0;i<CSAM_PGDIRBMP_CHUNKS;i++)564 for (unsigned i = 0; i < CSAM_PGDIRBMP_CHUNKS; i++) 565 565 { 566 566 if(csamInfo.pPDBitmapHC[i]) … … 592 592 * @param uPass The data pass. 593 593 */ 594 static DECLCALLBACK(int) csam r3Load(PVM pVM, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass)594 static DECLCALLBACK(int) csamR3Load(PVM pVM, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass) 595 595 { 596 596 int rc; … … 1867 1867 1868 1868 #ifdef CSAM_MONITOR_CODE_PAGES 1869 AssertRelease(! fInCSAMCodePageInvalidate);1869 AssertRelease(!g_fInCsamR3CodePageInvalidate); 1870 1870 1871 1871 switch (enmTag) … … 2112 2112 * if this happens often, then reuse it instead!!! 2113 2113 */ 2114 Assert(! fInCSAMCodePageInvalidate);2114 Assert(!g_fInCsamR3CodePageInvalidate); 2115 2115 STAM_COUNTER_DEC(&pVM->csam.s.StatPageMonitor); 2116 2116 PGMHandlerVirtualDeregister(pVM, pVCpu, GCPtr, false /*fHypervisor*/); … … 2179 2179 * @param pvUser User argument. 2180 2180 */ 2181 static DECLCALLBACK(int) CSAMCodePageWriteHandler(PVM pVM, RTGCPTR GCPtr, void *pvPtr, void *pvBuf, size_t cbBuf, PGMACCESSTYPE enmAccessType, void *pvUser) 2181 static DECLCALLBACK(int) csamR3CodePageWriteHandler(PVM pVM, RTGCPTR GCPtr, void *pvPtr, void *pvBuf, size_t cbBuf, 2182 PGMACCESSTYPE enmAccessType, void *pvUser) 2182 2183 { 2183 2184 int rc; 2184 2185 2185 2186 Assert(enmAccessType == PGMACCESSTYPE_WRITE); NOREF(enmAccessType); 2186 Log((" CSAMCodePageWriteHandler: write to %RGv size=%zu\n", GCPtr, cbBuf));2187 Log(("csamR3CodePageWriteHandler: write to %RGv size=%zu\n", GCPtr, cbBuf)); 2187 2188 NOREF(pvUser); 2188 2189 … … 2190 2191 && !memcmp(pvPtr, pvBuf, cbBuf)) 2191 2192 { 2192 Log((" CSAMCodePageWriteHandler: dummy write -> ignore\n"));2193 Log(("csamR3CodePageWriteHandler: dummy write -> ignore\n")); 2193 2194 return VINF_PGM_HANDLER_DO_DEFAULT; 2194 2195 } … … 2202 2203 * (if it writes the same data as the patch jump and we replace it with obsolete opcodes) 2203 2204 */ 2204 Log((" CSAMCodePageWriteHandler: delayed write!\n"));2205 Log(("csamR3CodePageWriteHandler: delayed write!\n")); 2205 2206 AssertCompileSize(RTRCPTR, 4); 2206 2207 rc = VMR3ReqCallVoidNoWait(pVM, VMCPUID_ANY, (PFNRT)CSAMDelayedWriteHandler, 3, pVM, (RTRCPTR)GCPtr, cbBuf); … … 2217 2218 * @param GCPtr The virtual address the guest has changed. 2218 2219 */ 2219 static DECLCALLBACK(int) CSAMCodePageInvalidate(PVM pVM, RTGCPTR GCPtr)2220 { 2221 fInCSAMCodePageInvalidate = true;2222 LogFlow((" CSAMCodePageInvalidate %RGv\n", GCPtr));2220 static DECLCALLBACK(int) csamR3CodePageInvalidate(PVM pVM, RTGCPTR GCPtr, void *pvUser) 2221 { 2222 g_fInCsamR3CodePageInvalidate = true; 2223 LogFlow(("csamR3CodePageInvalidate %RGv\n", GCPtr)); 2223 2224 /** @todo We can't remove the page (which unregisters the virtual handler) as we are called from a DoWithAll on the virtual handler tree. Argh. */ 2224 2225 csamFlushPage(pVM, GCPtr, false /* don't remove page! */); 2225 fInCSAMCodePageInvalidate = false;2226 g_fInCsamR3CodePageInvalidate = false; 2226 2227 return VINF_SUCCESS; 2227 2228 } -
trunk/src/VBox/VMM/VMMR3/PATM.cpp
r55889 r55895 92 92 * Internal Functions * 93 93 *******************************************************************************/ 94 static FNPGMR3VIRTHANDLER patmR3VirtPageHandler; 94 95 95 96 static int patmDisableUnusablePatch(PVM pVM, RTRCPTR pInstrGC, RTRCPTR pConflictAddr, PPATCHINFO pPatch); … … 217 218 if (RT_FAILURE(rc)) 218 219 return rc; 220 221 /* 222 * Register the virtual page access handler type. 223 */ 224 rc = PGMR3HandlerVirtualTypeRegister(pVM, PGMVIRTHANDLERKIND_ALL, false /*fRelocUserRC*/, 225 NULL /*pfnInvalidateR3*/, 226 patmR3VirtPageHandler, 227 "patmRCVirtPagePfHandler", NULL /*pszModRC*/, 228 "PATMMonitorPatchJump", &pVM->patm.s.hMonitorPageType); 229 AssertRCReturn(rc, rc); 219 230 220 231 /* … … 368 379 VERR_INTERNAL_ERROR_4); 369 380 370 371 /*372 * Register the virtual page access handler type.373 */374 rc = PGMR3HandlerVirtualTypeRegister(pVM, PGMVIRTHANDLERKIND_ALL, false /*fRelocUserRC*/,375 NULL /*pfnInvalidateR3*/,376 patmVirtPageHandler,377 "PATMGCMonitorPage", NULL /*pszModRC*/,378 "PATMMonitorPatchJump", &pVM->patm.s.hMonitorPageType);379 AssertRCReturn(rc, rc);380 381 381 382 return VINF_SUCCESS; … … 990 991 * @param pvUser User argument. 991 992 */ 992 DECLCALLBACK(int) patmVirtPageHandler(PVM pVM, RTGCPTR GCPtr, void *pvPtr, void *pvBuf, size_t cbBuf,993 PGMACCESSTYPE enmAccessType, void *pvUser)993 static DECLCALLBACK(int) patmR3VirtPageHandler(PVM pVM, RTGCPTR GCPtr, void *pvPtr, void *pvBuf, size_t cbBuf, 994 PGMACCESSTYPE enmAccessType, void *pvUser) 994 995 { 995 996 Assert(enmAccessType == PGMACCESSTYPE_WRITE); NOREF(enmAccessType); -
trunk/src/VBox/VMM/VMMR3/PGM.cpp
r55889 r55895 2440 2440 RTListOff32ForEach(&pVM->pgm.s.pTreesR3->HeadVirtHandlerTypes, pCurVirtType, PGMVIRTHANDLERTYPEINT, ListNode) 2441 2441 { 2442 if (pCurVirtType->pfn HandlerRC != NIL_RTRCPTR)2443 pCurVirtType->pfn HandlerRC += offDelta;2442 if (pCurVirtType->pfnPfHandlerRC != NIL_RTRCPTR) 2443 pCurVirtType->pfnPfHandlerRC += offDelta; 2444 2444 } 2445 2445 -
trunk/src/VBox/VMM/VMMR3/PGMHandler.cpp
r55890 r55895 291 291 PFNPGMR3VIRTINVALIDATE pfnInvalidateR3, 292 292 PFNPGMR3VIRTHANDLER pfnHandlerR3, 293 RCPTRTYPE( PFNPGMRCVIRTHANDLER) pfnHandlerRC,293 RCPTRTYPE(FNPGMRCVIRTPFHANDLER) pfnPfHandlerRC, 294 294 const char *pszDesc, PPGMVIRTHANDLERTYPE phType) 295 295 { … … 297 297 AssertReturn(RT_VALID_PTR(pfnHandlerR3) || enmKind == PGMVIRTHANDLERKIND_HYPERVISOR, VERR_INVALID_POINTER); 298 298 AssertPtrNullReturn(pfnInvalidateR3, VERR_INVALID_POINTER); 299 AssertReturn(pfn HandlerRC != NIL_RTRCPTR, VERR_INVALID_POINTER);299 AssertReturn(pfnPfHandlerRC != NIL_RTRCPTR, VERR_INVALID_POINTER); 300 300 AssertPtrReturn(pszDesc, VERR_INVALID_POINTER); 301 301 AssertReturn( enmKind == PGMVIRTHANDLERKIND_WRITE … … 316 316 pType->pfnInvalidateR3 = pfnInvalidateR3; 317 317 pType->pfnHandlerR3 = pfnHandlerR3; 318 pType->pfn HandlerRC = pfnHandlerRC;318 pType->pfnPfHandlerRC = pfnPfHandlerRC; 319 319 pType->pszDesc = pszDesc; 320 320 … … 324 324 325 325 *phType = MMHyperHeapPtrToOffset(pVM, pType); 326 LogFlow(("PGMR3HandlerVirtualTypeRegisterEx: %p/%#x: enmKind=%d pfnInvalidateR3=%RHv pfnHandlerR3=%RHv pfn HandlerRC=%RRv pszDesc=%s\n",327 pType, *phType, enmKind, pfnInvalidateR3, pfnHandlerR3, pfn HandlerRC, pszDesc));326 LogFlow(("PGMR3HandlerVirtualTypeRegisterEx: %p/%#x: enmKind=%d pfnInvalidateR3=%RHv pfnHandlerR3=%RHv pfnPfHandlerRC=%RRv pszDesc=%s\n", 327 pType, *phType, enmKind, pfnInvalidateR3, pfnHandlerR3, pfnPfHandlerRC, pszDesc)); 328 328 return VINF_SUCCESS; 329 329 } … … 346 346 * @param pszModRC The name of the raw-mode context module, NULL is an 347 347 * alias for the main RC module. 348 * @param psz HandlerRCThe name of the raw-mode context handler, NULL if348 * @param pszPfHandlerRC The name of the raw-mode context handler, NULL if 349 349 * the ring-3 handler should be called. 350 350 * @param pszDesc The type description. … … 356 356 PFNPGMR3VIRTINVALIDATE pfnInvalidateR3, 357 357 PFNPGMR3VIRTHANDLER pfnHandlerR3, 358 const char *psz HandlerRC, const char *pszModRC, const char *pszDesc,358 const char *pszPfHandlerRC, const char *pszModRC, const char *pszDesc, 359 359 PPGMVIRTHANDLERTYPE phType) 360 360 { 361 LogFlow(("PGMR3HandlerVirtualTypeRegister: enmKind=%d pfnInvalidateR3=%RHv pfnHandlerR3=%RHv pszModRC=%s psz HandlerRC=%s pszDesc=%s\n",362 enmKind, pfnInvalidateR3, pfnHandlerR3, psz HandlerRC, pszModRC, pszDesc));361 LogFlow(("PGMR3HandlerVirtualTypeRegister: enmKind=%d pfnInvalidateR3=%RHv pfnHandlerR3=%RHv pszModRC=%s pszPfHandlerRC=%s pszDesc=%s\n", 362 enmKind, pfnInvalidateR3, pfnHandlerR3, pszPfHandlerRC, pszModRC, pszDesc)); 363 363 364 364 /* … … 367 367 if (!pszModRC) 368 368 pszModRC = VMMGC_MAIN_MODULE_NAME; 369 if (!pszHandlerRC) 370 pszHandlerRC = "pgmVirtHandlerRedirectToHC"; 371 AssertPtrReturn(pszHandlerRC, VERR_INVALID_POINTER); 369 AssertPtrReturn(pszPfHandlerRC, VERR_INVALID_POINTER); 372 370 373 371 /* 374 372 * Resolve the GC handler. 375 373 */ 376 RTRCPTR pfn HandlerRC = NIL_RTRCPTR;377 int rc = PDMR3LdrGetSymbolRCLazy(pVM, pszModRC, NULL /*pszSearchPath*/, psz HandlerRC, &pfnHandlerRC);374 RTRCPTR pfnPfHandlerRC = NIL_RTRCPTR; 375 int rc = PDMR3LdrGetSymbolRCLazy(pVM, pszModRC, NULL /*pszSearchPath*/, pszPfHandlerRC, &pfnPfHandlerRC); 378 376 if (RT_SUCCESS(rc)) 379 377 return PGMR3HandlerVirtualTypeRegisterEx(pVM, enmKind, fRelocUserRC, 380 378 pfnInvalidateR3, pfnHandlerR3, 381 pfn HandlerRC,379 pfnPfHandlerRC, 382 380 pszDesc, phType); 383 381 384 AssertMsgFailed(("Failed to resolve %s.%s, rc=%Rrc.\n", pszModRC, psz HandlerRC, rc));382 AssertMsgFailed(("Failed to resolve %s.%s, rc=%Rrc.\n", pszModRC, pszPfHandlerRC, rc)); 385 383 return rc; 386 384 } … … 756 754 } 757 755 pHlp->pfnPrintf(pHlp, "%RGv - %RGv %RHv %RRv %s %s\n", 758 pCur->Core.Key, pCur->Core.KeyLast, pCurType->pfnHandlerR3, pCurType->pfn HandlerRC, pszType, pCur->pszDesc);756 pCur->Core.Key, pCur->Core.KeyLast, pCurType->pfnHandlerR3, pCurType->pfnPfHandlerRC, pszType, pCur->pszDesc); 759 757 #ifdef VBOX_WITH_STATISTICS 760 758 if (pArgs->fStats) -
trunk/src/VBox/VMM/VMMR3/SELM.cpp
r55892 r55895 95 95 static DECLCALLBACK(int) selmR3Load(PVM pVM, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass); 96 96 static DECLCALLBACK(int) selmR3LoadDone(PVM pVM, PSSMHANDLE pSSM); 97 static DECLCALLBACK(int) selmR3GuestGDTWriteHandler(PVM pVM, RTGCPTR GCPtr, void *pvPhys, void *pvBuf, size_t cbBuf, PGMACCESSTYPE enmAccessType, void *pvUser);98 static DECLCALLBACK(int) selmR3GuestLDTWriteHandler(PVM pVM, RTGCPTR GCPtr, void *pvPhys, void *pvBuf, size_t cbBuf, PGMACCESSTYPE enmAccessType, void *pvUser);99 static DECLCALLBACK(int) selmR3GuestTSSWriteHandler(PVM pVM, RTGCPTR GCPtr, void *pvPhys, void *pvBuf, size_t cbBuf, PGMACCESSTYPE enmAccessType, void *pvUser);97 static FNPGMR3VIRTHANDLER selmR3GuestGDTWriteHandler; 98 static FNPGMR3VIRTHANDLER selmR3GuestLDTWriteHandler; 99 static FNPGMR3VIRTHANDLER selmR3GuestTSSWriteHandler; 100 100 static DECLCALLBACK(void) selmR3InfoGdt(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs); 101 101 static DECLCALLBACK(void) selmR3InfoGdtGuest(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs); … … 203 203 rc = PGMR3HandlerVirtualTypeRegister(pVM, PGMVIRTHANDLERKIND_HYPERVISOR, false /*fRelocUserRC*/, 204 204 NULL /*pfnInvalidateR3*/, NULL /*pfnHandlerR3*/, 205 "selmRCShadowGDTWrite Handler", NULL /*pszModRC*/,205 "selmRCShadowGDTWritePfHandler", NULL /*pszModRC*/, 206 206 "Shadow GDT write access handler", &pVM->selm.s.hShadowGdtWriteHandlerType); 207 207 AssertRCReturn(rc, rc); … … 210 210 rc = PGMR3HandlerVirtualTypeRegister(pVM, PGMVIRTHANDLERKIND_HYPERVISOR, false /*fRelocUserRC*/, 211 211 NULL /*pfnInvalidateR3*/, NULL /*pfnHandlerR3*/, 212 "selmRCShadowTSSWrite Handler", NULL /*pszModRC*/,212 "selmRCShadowTSSWritePfHandler", NULL /*pszModRC*/, 213 213 "Shadow TSS write access handler", &pVM->selm.s.hShadowTssWriteHandlerType); 214 214 AssertRCReturn(rc, rc); … … 217 217 rc = PGMR3HandlerVirtualTypeRegister(pVM, PGMVIRTHANDLERKIND_HYPERVISOR, false /*fRelocUserRC*/, 218 218 NULL /*pfnInvalidateR3*/, NULL /*pfnHandlerR3*/, 219 "selmRCShadowLDTWrite Handler", NULL /*pszModRC*/,219 "selmRCShadowLDTWritePfHandler", NULL /*pszModRC*/, 220 220 "Shadow LDT write access handler", &pVM->selm.s.hShadowLdtWriteHandlerType); 221 221 AssertRCReturn(rc, rc); … … 223 223 rc = PGMR3HandlerVirtualTypeRegister(pVM, PGMVIRTHANDLERKIND_WRITE, false /*fRelocUserRC*/, 224 224 NULL /*pfnInvalidateR3*/, selmR3GuestGDTWriteHandler, 225 "selmRCGuestGDTWrite Handler", NULL /*pszModRC*/,225 "selmRCGuestGDTWritePfHandler", NULL /*pszModRC*/, 226 226 "Guest GDT write access handler", &pVM->selm.s.hGuestGdtWriteHandlerType); 227 227 AssertRCReturn(rc, rc); 228 228 rc = PGMR3HandlerVirtualTypeRegister(pVM, PGMVIRTHANDLERKIND_WRITE, false /*fRelocUserRC*/, 229 229 NULL /*pfnInvalidateR3*/, selmR3GuestLDTWriteHandler, 230 "selmRCGuestLDTWrite Handler", NULL /*pszModRC*/,230 "selmRCGuestLDTWritePfHandler", NULL /*pszModRC*/, 231 231 "Guest LDT write access handler", &pVM->selm.s.hGuestLdtWriteHandlerType); 232 232 AssertRCReturn(rc, rc); 233 233 rc = PGMR3HandlerVirtualTypeRegister(pVM, PGMVIRTHANDLERKIND_WRITE, false /*fRelocUserRC*/, 234 234 NULL /*pfnInvalidateR3*/, selmR3GuestTSSWriteHandler, 235 "selmRCGuestTSSWrite Handler", NULL /*pszModRC*/,235 "selmRCGuestTSSWritePfHandler", NULL /*pszModRC*/, 236 236 "Guest TSS write access handler", &pVM->selm.s.hGuestTssWriteHandlerType); 237 237 AssertRCReturn(rc, rc); -
trunk/src/VBox/VMM/VMMR3/TRPM.cpp
r55893 r55895 518 518 rc = PGMR3HandlerVirtualTypeRegister(pVM, PGMVIRTHANDLERKIND_HYPERVISOR, false /*fRelocUserRC*/, 519 519 NULL /*pfnInvalidateR3*/, NULL /*pfnHandlerR3*/, 520 "trpmRCShadowIDTWrite Handler", NULL /*pszModRC*/,520 "trpmRCShadowIDTWritePfHandler", NULL /*pszModRC*/, 521 521 "Shadow IDT write access handler", &pVM->trpm.s.hShadowIdtWriteHandlerType); 522 522 AssertRCReturn(rc, rc); … … 524 524 rc = PGMR3HandlerVirtualTypeRegister(pVM, PGMVIRTHANDLERKIND_WRITE, false /*fRelocUserRC*/, 525 525 NULL /*pfnInvalidateR3*/, trpmR3GuestIDTWriteHandler, 526 "trpmRCGuestIDTWrite Handler", NULL /*pszModRC*/,526 "trpmRCGuestIDTWritePfHandler", NULL /*pszModRC*/, 527 527 "Guest IDT write access handler", &pVM->trpm.s.hGuestIdtWriteHandlerType); 528 528 AssertRCReturn(rc, rc); -
trunk/src/VBox/VMM/VMMRC/CSAMRC.cpp
r45620 r55895 46 46 #include <iprt/string.h> 47 47 48 49 48 50 /** 49 51 * \#PF Handler callback for virtual access handler ranges. (CSAM self-modifying … … 61 63 * @param offRange The offset of the access into this range. 62 64 * (If it's a EIP range this is the EIP, if not it's pvFault.) 65 * @param pvUser Ignored. 63 66 */ 64 VMMRCDECL(int) CSAMGCCodePageWriteHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, RTGCPTR pvRange, uintptr_t offRange) 67 DECLEXPORT(int) csamRCCodePageWritePfHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, 68 RTGCPTR pvRange, uintptr_t offRange, void *pvUser) 65 69 { 66 70 PPATMGCSTATE pPATMGCState; … … 81 85 82 86 Assert(pPATMGCState->fPIF || fPatchCode); 83 /* *When patch code is executing instructions that must complete, then we must *never* interrupt it. */87 /* When patch code is executing instructions that must complete, then we must *never* interrupt it. */ 84 88 if (!pPATMGCState->fPIF && fPatchCode) 85 89 { 86 Log((" CSAMGCCodePageWriteHandler: fPIF=0 -> stack fault in patch generated code at %08RX32!\n", pRegFrame->eip));90 Log(("csamRCCodePageWriteHandler: fPIF=0 -> stack fault in patch generated code at %08RX32!\n", pRegFrame->eip)); 87 91 /** @note there are cases when pages previously used for code are now used for stack; patch generated code will fault (pushf)) 88 92 * Just make the page r/w and continue. … … 104 108 cpl = (pRegFrame->ss.Sel & X86_SEL_RPL); 105 109 106 Log((" CSAMGCCodePageWriteHandler: code page write at %RGv original address %RGv (cpl=%d)\n", pvFault, (RTGCUINTPTR)pvRange + offRange, cpl));110 Log(("csamRCCodePageWriteHandler: code page write at %RGv original address %RGv (cpl=%d)\n", pvFault, (RTGCUINTPTR)pvRange + offRange, cpl)); 107 111 108 112 /* If user code is modifying one of our monitored pages, then we can safely make it r/w as it's no longer being used for supervisor code. */ … … 131 135 * Make this particular page R/W. The VM_FF_CSAM_FLUSH_DIRTY_PAGE handler will reset it to readonly again. 132 136 */ 133 Log((" CSAMGCCodePageWriteHandler: enabled r/w for page %RGv\n", pvFault));137 Log(("csamRCCodePageWriteHandler: enabled r/w for page %RGv\n", pvFault)); 134 138 rc = PGMShwMakePageWritable(pVCpu, pvFault, PGM_MK_PG_IS_WRITE_FAULT); 135 139 AssertMsgRC(rc, ("PGMShwModifyPage -> rc=%Rrc\n", rc)); -
trunk/src/VBox/VMM/VMMRC/PATMRC.cpp
r45485 r55895 57 57 * (If it's a EIP range this is the EIP, if not it's pvFault.) 58 58 */ 59 VMMRCDECL(int) PATMGCMonitorPage(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, RTGCPTR pvRange, uintptr_t offRange) 59 DECLEXPORT(int) patmRCVirtPagePfHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, 60 RTGCPTR pvRange, uintptr_t offRange, void *pvUser) 60 61 { 61 62 NOREF(uErrorCode); NOREF(pRegFrame); NOREF(pvFault); NOREF(pvRange); NOREF(offRange); -
trunk/src/VBox/VMM/VMMRC/SELMRC.cpp
r49914 r55895 223 223 224 224 225 226 225 /** 227 226 * \#PF Virtual Handler callback for Guest write access to the Guest's own GDT. … … 236 235 * (If it's a EIP range this is the EIP, if not it's pvFault.) 237 236 */ 238 VMMRCDECL(int) selmRCGuestGDTWriteHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, RTGCPTR pvRange, uintptr_t offRange) 237 DECLEXPORT(int) selmRCGuestGDTWritePfHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, 238 RTGCPTR pvRange, uintptr_t offRange, void *pvUser) 239 239 { 240 240 PVMCPU pVCpu = VMMGetCpu0(pVM); 241 LogFlow(("selmRCGuestGDTWrite Handler errcode=%x fault=%RGv offRange=%08x\n", (uint32_t)uErrorCode, pvFault, offRange));242 NOREF(pvRange); 241 LogFlow(("selmRCGuestGDTWritePfHandler errcode=%x fault=%RGv offRange=%08x\n", (uint32_t)uErrorCode, pvFault, offRange)); 242 NOREF(pvRange); NOREF(pvUser); 243 243 244 244 /* … … 328 328 * @param offRange The offset of the access into this range. 329 329 * (If it's a EIP range this is the EIP, if not it's pvFault.) 330 */ 331 VMMRCDECL(int) selmRCGuestLDTWriteHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, RTGCPTR pvRange, uintptr_t offRange) 330 * @param pvUser Unused. 331 */ 332 DECLEXPORT(int) selmRCGuestLDTWritePfHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, 333 RTGCPTR pvRange, uintptr_t offRange, void *pvUser) 332 334 { 333 335 /** @todo To be implemented. */ 334 336 ////LogCom(("selmRCGuestLDTWriteHandler: eip=%08X pvFault=%RGv pvRange=%RGv\r\n", pRegFrame->eip, pvFault, pvRange)); 335 NOREF(uErrorCode); NOREF(pRegFrame); NOREF(pvFault); NOREF(pvRange); NOREF(offRange); 337 NOREF(uErrorCode); NOREF(pRegFrame); NOREF(pvFault); NOREF(pvRange); NOREF(offRange); NOREF(pvUser); 336 338 337 339 VMCPU_FF_SET(VMMGetCpu0(pVM), VMCPU_FF_SELM_SYNC_LDT); … … 381 383 * @param offRange The offset of the access into this range. 382 384 * (If it's a EIP range this is the EIP, if not it's pvFault.) 383 */ 384 VMMRCDECL(int) selmRCGuestTSSWriteHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, RTGCPTR pvRange, uintptr_t offRange) 385 * @param pvUser Unused. 386 */ 387 DECLEXPORT(int) selmRCGuestTSSWritePfHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, 388 RTGCPTR pvRange, uintptr_t offRange, void *pvUser) 385 389 { 386 390 PVMCPU pVCpu = VMMGetCpu0(pVM); 387 LogFlow(("selmRCGuestTSSWrite Handler errcode=%x fault=%RGv offRange=%08x\n", (uint32_t)uErrorCode, pvFault, offRange));388 NOREF(pvRange); 391 LogFlow(("selmRCGuestTSSWritePfHandler errcode=%x fault=%RGv offRange=%08x\n", (uint32_t)uErrorCode, pvFault, offRange)); 392 NOREF(pvRange); NOREF(pvUser); 389 393 390 394 /* … … 409 413 ) 410 414 { 411 Log(("selmRCGuestTSSWrite Handler: R0 stack: %RTsel:%RGv -> %RTsel:%RGv\n",415 Log(("selmRCGuestTSSWritePfHandler: R0 stack: %RTsel:%RGv -> %RTsel:%RGv\n", 412 416 (RTSEL)(pVM->selm.s.Tss.ss1 & ~1), (RTGCPTR)pVM->selm.s.Tss.esp1, (RTSEL)pGuestTss->ss0, (RTGCPTR)pGuestTss->esp0)); 413 417 pVM->selm.s.Tss.esp1 = pGuestTss->esp0; … … 423 427 ) 424 428 { 425 Log(("selmRCGuestTSSWrite Handler: R1 stack: %RTsel:%RGv -> %RTsel:%RGv\n",429 Log(("selmRCGuestTSSWritePfHandler: R1 stack: %RTsel:%RGv -> %RTsel:%RGv\n", 426 430 (RTSEL)((pVM->selm.s.Tss.ss2 & ~2) | 1), (RTGCPTR)pVM->selm.s.Tss.esp2, (RTSEL)pGuestTss->ss1, (RTGCPTR)pGuestTss->esp1)); 427 431 pVM->selm.s.Tss.esp2 = pGuestTss->esp1; … … 447 451 ) 448 452 { 449 Log(("selmRCGuestTSSWrite Handler: R0 stack: %RTsel:%RGv -> %RTsel:%RGv [x-page]\n",453 Log(("selmRCGuestTSSWritePfHandler: R0 stack: %RTsel:%RGv -> %RTsel:%RGv [x-page]\n", 450 454 (RTSEL)(pVM->selm.s.Tss.ss1 & ~1), (RTGCPTR)pVM->selm.s.Tss.esp1, (RTSEL)s.ss0, (RTGCPTR)s.esp0)); 451 455 pVM->selm.s.Tss.esp1 = s.esp0; … … 534 538 * @param offRange The offset of the access into this range. 535 539 * (If it's a EIP range this is the EIP, if not it's pvFault.) 536 */ 537 VMMRCDECL(int) selmRCShadowGDTWriteHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, RTGCPTR pvRange, uintptr_t offRange) 538 { 539 LogRel(("FATAL ERROR: selmRCShadowGDTWriteHandler: eip=%08X pvFault=%RGv pvRange=%RGv\r\n", pRegFrame->eip, pvFault, pvRange)); 540 NOREF(pVM); NOREF(uErrorCode); NOREF(pRegFrame); NOREF(pvFault); NOREF(pvRange); NOREF(offRange); 540 * @param pvUser Unused. 541 */ 542 DECLEXPORT(int) selmRCShadowGDTWritePfHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, 543 RTGCPTR pvRange, uintptr_t offRange, void *pvUser) 544 { 545 LogRel(("FATAL ERROR: selmRCShadowGDTWritePfHandler: eip=%08X pvFault=%RGv pvRange=%RGv\r\n", pRegFrame->eip, pvFault, pvRange)); 546 NOREF(pVM); NOREF(uErrorCode); NOREF(pRegFrame); NOREF(pvFault); NOREF(pvRange); NOREF(offRange); NOREF(pvUser); 541 547 return VERR_SELM_SHADOW_GDT_WRITE; 542 548 } … … 556 562 * @param offRange The offset of the access into this range. 557 563 * (If it's a EIP range this is the EIP, if not it's pvFault.) 558 */ 559 VMMRCDECL(int) selmRCShadowLDTWriteHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, RTGCPTR pvRange, uintptr_t offRange) 560 { 561 LogRel(("FATAL ERROR: selmRCShadowLDTWriteHandler: eip=%08X pvFault=%RGv pvRange=%RGv\r\n", pRegFrame->eip, pvFault, pvRange)); 564 * @param pvUser Unused. 565 */ 566 DECLEXPORT(int) selmRCShadowLDTWritePfHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, 567 RTGCPTR pvRange, uintptr_t offRange, void *pvUser) 568 { 569 LogRel(("FATAL ERROR: selmRCShadowLDTWritePfHandler: eip=%08X pvFault=%RGv pvRange=%RGv\r\n", pRegFrame->eip, pvFault, pvRange)); 562 570 Assert(pvFault - (uintptr_t)pVM->selm.s.pvLdtRC < (unsigned)(65536U + PAGE_SIZE)); 563 NOREF(pVM); NOREF(uErrorCode); NOREF(pRegFrame); NOREF(pvFault); NOREF(pvRange); NOREF(offRange); 571 NOREF(pVM); NOREF(uErrorCode); NOREF(pRegFrame); NOREF(pvFault); NOREF(pvRange); NOREF(offRange); NOREF(pvUser); 564 572 return VERR_SELM_SHADOW_LDT_WRITE; 565 573 } … … 579 587 * @param offRange The offset of the access into this range. 580 588 * (If it's a EIP range this is the EIP, if not it's pvFault.) 581 */ 582 VMMRCDECL(int) selmRCShadowTSSWriteHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, RTGCPTR pvRange, uintptr_t offRange) 583 { 584 LogRel(("FATAL ERROR: selmRCShadowTSSWriteHandler: eip=%08X pvFault=%RGv pvRange=%RGv\r\n", pRegFrame->eip, pvFault, pvRange)); 585 NOREF(pVM); NOREF(uErrorCode); NOREF(pRegFrame); NOREF(pvFault); NOREF(pvRange); NOREF(offRange); 589 * @param pvUser Unused. 590 */ 591 DECLEXPORT(int) selmRCShadowTSSWritePfHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, 592 RTGCPTR pvRange, uintptr_t offRange, void *pvUser) 593 { 594 LogRel(("FATAL ERROR: selmRCShadowTSSWritePfHandler: eip=%08X pvFault=%RGv pvRange=%RGv\r\n", pRegFrame->eip, pvFault, pvRange)); 595 NOREF(pVM); NOREF(uErrorCode); NOREF(pRegFrame); NOREF(pvFault); NOREF(pvRange); NOREF(offRange); NOREF(pvUser); 586 596 return VERR_SELM_SHADOW_TSS_WRITE; 587 597 } -
trunk/src/VBox/VMM/VMMRC/TRPMRC.cpp
r44528 r55895 101 101 * @param offRange The offset of the access into this range. 102 102 * (If it's a EIP range this is the EIP, if not it's pvFault.) 103 * @param pvUser Unused. 103 104 */ 104 VMMRCDECL(int) trpmRCGuestIDTWriteHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, RTGCPTR pvRange, uintptr_t offRange) 105 DECLEXPORT(int) trpmRCGuestIDTWritePfHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, 106 RTGCPTR pvRange, uintptr_t offRange, void *pvUser) 105 107 { 106 108 PVMCPU pVCpu = VMMGetCpu0(pVM); … … 114 116 AssertMsg(offRange < (uint32_t)cbIDT+1, ("pvFault=%RGv GCPtrIDT=%RGv-%RGv pvRange=%RGv\n", pvFault, GCPtrIDT, GCPtrIDTEnd, pvRange)); 115 117 Assert((RTGCPTR)(RTRCUINTPTR)pvRange == GCPtrIDT); 116 NOREF(uErrorCode); 118 NOREF(uErrorCode); NOREF(pvUser); 117 119 118 120 #if 0 … … 143 145 #endif 144 146 145 Log(("trpmRCGuestIDTWrite Handler: eip=%RGv write to gate %x offset %x\n", pRegFrame->eip, iGate, offRange));147 Log(("trpmRCGuestIDTWritePfHandler: eip=%RGv write to gate %x offset %x\n", pRegFrame->eip, iGate, offRange)); 146 148 147 149 /** @todo Check which IDT entry and keep the update cost low in TRPMR3SyncIDT() and CSAMCheckGates(). */ … … 164 166 * @param offRange The offset of the access into this range. 165 167 * (If it's a EIP range this is the EIP, if not it's pvFault.) 168 * @param pvUser Unused. 166 169 */ 167 VMMRCDECL(int) trpmRCShadowIDTWriteHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, RTGCPTR pvRange, uintptr_t offRange) 170 DECLEXPORT(int) trpmRCShadowIDTWritePfHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, 171 RTGCPTR pvRange, uintptr_t offRange, void *pvUser) 168 172 { 169 173 PVMCPU pVCpu = VMMGetCpu0(pVM); 170 LogRel(("FATAL ERROR: trpmRCShadowIDTWrite Handler: eip=%08X pvFault=%RGv pvRange=%08RGv\r\n", pRegFrame->eip, pvFault, pvRange));171 NOREF(uErrorCode); NOREF(offRange); 174 LogRel(("FATAL ERROR: trpmRCShadowIDTWritePfHandler: eip=%08X pvFault=%RGv pvRange=%08RGv\r\n", pRegFrame->eip, pvFault, pvRange)); 175 NOREF(uErrorCode); NOREF(offRange); NOREF(pvUser); 172 176 173 177 /* -
trunk/src/VBox/VMM/include/CSAMInternal.h
r55889 r55895 283 283 284 284 RT_C_DECLS_BEGIN 285 VMMRCDECL(int) CSAMGCCodePageWriteHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, RTGCPTR pvRange, uintptr_t offRange);285 DECLEXPORT(FNPGMRCVIRTPFHANDLER) csamRCCodePageWritePfHandler; 286 286 RT_C_DECLS_END 287 287 -
trunk/src/VBox/VMM/include/PATMInternal.h
r55889 r55895 599 599 600 600 601 DECLCALLBACK(int) patmVirtPageHandler(PVM pVM, RTGCPTR GCPtr, void *pvPtr, void *pvBuf, size_t cbBuf, PGMACCESSTYPE enmAccessType, void *pvUser);602 603 601 DECLCALLBACK(int) patmR3Save(PVM pVM, PSSMHANDLE pSSM); 604 602 DECLCALLBACK(int) patmR3Load(PVM pVM, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass); … … 639 637 640 638 RT_C_DECLS_BEGIN 641 /** 642 * #PF Virtual Handler callback for Guest access a page monitored by PATM 643 * 644 * @returns VBox status code (appropriate for trap handling and GC return). 645 * @param pVM Pointer to the VM. 646 * @param uErrorCode CPU Error code. 647 * @param pRegFrame Trap register frame. 648 * @param pvFault The fault address (cr2). 649 * @param pvRange The base address of the handled virtual range. 650 * @param offRange The offset of the access into this range. 651 * (If it's a EIP range this is the EIP, if not it's pvFault.) 652 */ 653 VMMRCDECL(int) PATMGCMonitorPage(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, RTGCPTR pvRange, uintptr_t offRange); 654 639 DECLEXPORT(FNPGMRCVIRTPFHANDLER) patmRCVirtPagePfHandler; 655 640 RT_C_DECLS_END 656 641 -
trunk/src/VBox/VMM/include/PGMInternal.h
r55889 r55895 711 711 bool afPadding[3]; 712 712 /** Pointer to RC callback function. */ 713 RCPTRTYPE(PFNPGMRCVIRT HANDLER) pfnHandlerRC;713 RCPTRTYPE(PFNPGMRCVIRTPFHANDLER) pfnPfHandlerRC; 714 714 /** Pointer to the R3 callback function for invalidation. */ 715 715 R3PTRTYPE(PFNPGMR3VIRTINVALIDATE) pfnInvalidateR3; -
trunk/src/VBox/VMM/include/SELMInternal.h
r55894 r55895 230 230 RT_C_DECLS_BEGIN 231 231 232 VMMRCDECL(int) selmRCGuestGDTWriteHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, RTGCPTR pvRange, uintptr_t offRange); 233 VMMRCDECL(int) selmRCGuestLDTWriteHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, RTGCPTR pvRange, uintptr_t offRange); 234 VMMRCDECL(int) selmRCGuestTSSWriteHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, RTGCPTR pvRange, uintptr_t offRange); 235 236 VMMRCDECL(int) selmRCShadowGDTWriteHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, RTGCPTR pvRange, uintptr_t offRange); 237 VMMRCDECL(int) selmRCShadowLDTWriteHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, RTGCPTR pvRange, uintptr_t offRange); 238 VMMRCDECL(int) selmRCShadowTSSWriteHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, RTGCPTR pvRange, uintptr_t offRange); 232 DECLEXPORT(FNPGMRCVIRTPFHANDLER) selmRCGuestGDTWritePfHandler; 233 DECLEXPORT(FNPGMRCVIRTPFHANDLER) selmRCGuestLDTWritePfHandler; 234 DECLEXPORT(FNPGMRCVIRTPFHANDLER) selmRCGuestTSSWritePfHandler; 235 DECLEXPORT(FNPGMRCVIRTPFHANDLER) selmRCShadowGDTWritePfHandler; 236 DECLEXPORT(FNPGMRCVIRTPFHANDLER) selmRCShadowLDTWritePfHandler; 237 DECLEXPORT(FNPGMRCVIRTPFHANDLER) selmRCShadowTSSWritePfHandler; 239 238 240 239 void selmSetRing1Stack(PVM pVM, uint32_t ss, RTGCPTR32 esp); -
trunk/src/VBox/VMM/include/TRPMInternal.h
r55889 r55895 249 249 250 250 251 VMMRCDECL(int) trpmRCGuestIDTWriteHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, RTGCPTR pvRange, uintptr_t offRange);252 VMMRCDECL(int) trpmRCShadowIDTWriteHandler(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, RTGCPTR pvRange, uintptr_t offRange);251 DECLEXPORT(FNPGMRCVIRTPFHANDLER) trpmRCGuestIDTWritePfHandler; 252 DECLEXPORT(FNPGMRCVIRTPFHANDLER) trpmRCShadowIDTWritePfHandler; 253 253 254 254 /** -
trunk/src/VBox/VMM/testcase/tstVMStruct.h
r55889 r55895 811 811 GEN_CHECK_OFF(PGMVIRTHANDLERTYPEINT, uState); 812 812 GEN_CHECK_OFF(PGMVIRTHANDLERTYPEINT, fRelocUserRC); 813 GEN_CHECK_OFF(PGMVIRTHANDLERTYPEINT, pfn HandlerRC);813 GEN_CHECK_OFF(PGMVIRTHANDLERTYPEINT, pfnPfHandlerRC); 814 814 GEN_CHECK_OFF(PGMVIRTHANDLERTYPEINT, pfnInvalidateR3); 815 815 GEN_CHECK_OFF(PGMVIRTHANDLERTYPEINT, pfnHandlerR3);
Note:
See TracChangeset
for help on using the changeset viewer.