Changeset 18927 in vbox for trunk/src/VBox/VMM/PATM/PATMGuest.cpp
- Timestamp:
- Apr 16, 2009 11:41:38 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 46003
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PATM/PATMGuest.cpp
r13835 r18927 99 99 int PATMPatchSysenterXP(PVM pVM, RTGCPTR32 pInstrGC, PPATMPATCHREC pPatchRec) 100 100 { 101 PPATCHINFO pPatch = &pPatchRec->patch;102 uint8_t uTemp[16];101 PPATCHINFO pPatch = &pPatchRec->patch; 102 uint8_t uTemp[16]; 103 103 RTGCPTR32 lpfnKiFastSystemCall, lpfnKiIntSystemCall = 0; /* (initializing it to shut up warning.) */ 104 int rc, i; 104 int rc, i; 105 PVMCPU pVCpu = VMMGetCpu0(pVM); 105 106 106 107 Assert(sizeof(uTemp) > sizeof(uFnKiIntSystemCall)); … … 111 112 /* check the epilog of KiFastSystemCall */ 112 113 lpfnKiFastSystemCall = pInstrGC - 2; 113 rc = PGMPhysSimpleReadGCPtr(pV M, uTemp, lpfnKiFastSystemCall, sizeof(uFnKiFastSystemCall));114 rc = PGMPhysSimpleReadGCPtr(pVCpu, uTemp, lpfnKiFastSystemCall, sizeof(uFnKiFastSystemCall)); 114 115 if ( RT_FAILURE(rc) 115 116 || memcmp(uFnKiFastSystemCall, uTemp, sizeof(uFnKiFastSystemCall))) … … 121 122 for (i=0;i<64;i++) 122 123 { 123 rc = PGMPhysSimpleReadGCPtr(pV M, uTemp, pInstrGC + i, sizeof(uFnKiIntSystemCall));124 rc = PGMPhysSimpleReadGCPtr(pVCpu, uTemp, pInstrGC + i, sizeof(uFnKiIntSystemCall)); 124 125 if(RT_FAILURE(rc)) 125 126 { … … 146 147 147 148 // make a copy of the guest code bytes that will be overwritten 148 rc = PGMPhysSimpleReadGCPtr(pV M, pPatch->aPrivInstr, pPatch->pPrivInstrGC, SIZEOF_NEARJUMP32);149 rc = PGMPhysSimpleReadGCPtr(pVCpu, pPatch->aPrivInstr, pPatch->pPrivInstrGC, SIZEOF_NEARJUMP32); 149 150 AssertRC(rc); 150 151 … … 152 153 uTemp[0] = 0xE9; 153 154 *(RTGCPTR32 *)&uTemp[1] = lpfnKiIntSystemCall - (pInstrGC + SIZEOF_NEARJUMP32); 154 rc = PGMPhysSimpleDirtyWriteGCPtr(pV M, pInstrGC, uTemp, SIZEOF_NEARJUMP32);155 rc = PGMPhysSimpleDirtyWriteGCPtr(pVCpu, pInstrGC, uTemp, SIZEOF_NEARJUMP32); 155 156 if (RT_FAILURE(rc)) 156 157 { … … 189 190 /* Guest OS specific patch; check heuristics first */ 190 191 191 rc = PGMPhysSimpleReadGCPtr( pVM, uTemp, pInstrGC, RT_MAX(sizeof(uFnOpenBSDHandlerPrefix1), sizeof(uFnOpenBSDHandlerPrefix2)));192 rc = PGMPhysSimpleReadGCPtr(VMMGetCpu0(pVM), uTemp, pInstrGC, RT_MAX(sizeof(uFnOpenBSDHandlerPrefix1), sizeof(uFnOpenBSDHandlerPrefix2))); 192 193 if ( RT_FAILURE(rc) 193 194 || ( memcmp(uFnOpenBSDHandlerPrefix1, uTemp, sizeof(uFnOpenBSDHandlerPrefix1))
Note:
See TracChangeset
for help on using the changeset viewer.