Changeset 30495 in vbox
- Timestamp:
- Jun 29, 2010 12:44:34 PM (15 years ago)
- Location:
- trunk/src/VBox/VMM/PATM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PATM/CSAM.cpp
r30493 r30495 2481 2481 * Get IDT entries. 2482 2482 */ 2483 if (PAGE_ADDRESS(GCPtrIDT) == PAGE_ADDRESS(GCPtrIDT+cGates*sizeof(VBOXIDTE))) 2484 { 2485 /* Just convert the IDT address to a R3 pointer. The whole IDT fits in one page. */ 2486 rc = PGMPhysGCPtr2R3Ptr(pVCpu, GCPtrIDT, (PRTR3PTR)&pGuestIdte); 2487 if (RT_FAILURE(rc)) 2488 { 2489 AssertMsgRC(rc, ("Failed to read IDTE! rc=%Rrc\n", rc)); 2490 STAM_PROFILE_STOP(&pVM->csam.s.StatCheckGates, a); 2491 return rc; 2492 } 2493 } 2494 else 2495 { 2496 /* Slow method when it crosses a page boundary. */ 2497 rc = PGMPhysSimpleReadGCPtr(pVCpu, aIDT, GCPtrIDT, cGates*sizeof(VBOXIDTE)); 2498 if (RT_FAILURE(rc)) 2499 { 2500 AssertMsgRC(rc, ("Failed to read IDTE! rc=%Rrc\n", rc)); 2501 STAM_PROFILE_STOP(&pVM->csam.s.StatCheckGates, a); 2502 return rc; 2503 } 2504 pGuestIdte = &aIDT[0]; 2505 } 2483 rc = PGMPhysSimpleReadGCPtr(pVCpu, aIDT, GCPtrIDT, cGates*sizeof(VBOXIDTE)); 2484 if (RT_FAILURE(rc)) 2485 { 2486 AssertMsgRC(rc, ("Failed to read IDTE! rc=%Rrc\n", rc)); 2487 STAM_PROFILE_STOP(&pVM->csam.s.StatCheckGates, a); 2488 return rc; 2489 } 2490 pGuestIdte = &aIDT[0]; 2506 2491 2507 2492 for (/*iGate*/; iGate<iGateEnd; iGate++, pGuestIdte++) -
trunk/src/VBox/VMM/PATM/PATM.cpp
r30493 r30495 600 600 if (pPatch->patch.flags & PATMFL_PATCHED_GUEST_CODE) 601 601 { 602 PGMPAGEMAPLOCK PageLock; 603 602 604 /** @note pPrivInstrHC is probably not valid anymore */ 603 rc = PGMPhysGCP tr2R3Ptr(VMMGetCpu0(pVM), pPatch->patch.pPrivInstrGC, (PRTR3PTR)&pPatch->patch.pPrivInstrHC);605 rc = PGMPhysGCPhys2CCPtrReadOnly(pVM, pPatch->patch.pPrivInstrGC, (const void **)&pPatch->patch.pPrivInstrHC, &PageLock); 604 606 if (rc == VINF_SUCCESS) 605 607 { … … 607 609 disret = PATMR3DISInstr(pVM, &pPatch->patch, &cpu, pPatch->patch.pPrivInstrGC, pPatch->patch.pPrivInstrHC, &opsize, szOutput, PATMREAD_RAWCODE); 608 610 Log(("Org patch jump: %s", szOutput)); 611 612 PGMPhysReleasePageMappingLock(pVM, &PageLock); 609 613 } 610 614 } … … 786 790 if (pPatch->patch.flags & PATMFL_PATCHED_GUEST_CODE) 787 791 { 792 PGMPAGEMAPLOCK PageLock; 793 788 794 /** @note pPrivInstrHC is probably not valid anymore */ 789 rc = PGMPhysGCP tr2R3Ptr(VMMGetCpu0(pVM), pPatch->patch.pPrivInstrGC, (PRTR3PTR)&pPatch->patch.pPrivInstrHC);795 rc = PGMPhysGCPhys2CCPtrReadOnly(pVM, pPatch->patch.pPrivInstrGC, (const void **)&pPatch->patch.pPrivInstrHC, &PageLock); 790 796 if (rc == VINF_SUCCESS) 791 797 { … … 793 799 disret = PATMR3DISInstr(pVM, &pPatch->patch, &cpu, pPatch->patch.pPrivInstrGC, pPatch->patch.pPrivInstrHC, &opsize, szOutput, PATMREAD_RAWCODE); 794 800 Log(("Rel patch jump: %s", szOutput)); 801 802 PGMPhysReleasePageMappingLock(pVM, &PageLock); 795 803 } 796 804 }
Note:
See TracChangeset
for help on using the changeset viewer.