Changeset 1359 in vbox for trunk/src/VBox/VMM/PATM
- Timestamp:
- Mar 9, 2007 10:40:44 AM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 19350
- Location:
- trunk/src/VBox/VMM/PATM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PATM/CSAM.cpp
r1086 r1359 2048 2048 if (CSAMIsEnabled(pVM)) 2049 2049 { 2050 bool fCode32 = SELMIsSelector32Bit(pVM, Sel, pHiddenSel); 2050 X86EFLAGS fakeflags; 2051 2052 /* we're not in v86 mode here */ 2053 fakeflags.u32 = 0; 2054 2055 bool fCode32 = SELMIsSelector32Bit(pVM, fakeflags, Sel, pHiddenSel); 2051 2056 2052 2057 //assuming 32 bits code for now 2053 2058 Assert(fCode32); 2054 2059 2055 pInstrGC = SELMToFlat(pVM, Sel, pHiddenSel, pInstrGC);2060 pInstrGC = SELMToFlat(pVM, fakeflags, Sel, pHiddenSel, pInstrGC); 2056 2061 2057 2062 return CSAMR3CheckCode(pVM, pInstrGC); … … 2239 2244 CSAMP2GLOOKUPREC cacheRec = {0}; /* Cache record for PATMGCVirtToHCVirt. */ 2240 2245 PCSAMPAGE pPage = NULL; 2246 X86EFLAGS fakeflags; 2247 2248 /* we're not in v86 mode here */ 2249 fakeflags.u32 = 0; 2241 2250 2242 2251 pHandler = (pGuestIdte->Gen.u16OffsetHigh << 16) | pGuestIdte->Gen.u16OffsetLow; 2243 pHandler = SELMToFlat(pVM, pGuestIdte->Gen.u16SegSel, 0, pHandler);2252 pHandler = SELMToFlat(pVM, fakeflags, pGuestIdte->Gen.u16SegSel, 0, pHandler); 2244 2253 2245 2254 if (pGuestIdte->Gen.u5Type2 == VBOX_IDTE_TYPE2_TRAP_32) -
trunk/src/VBox/VMM/PATM/PATM.cpp
r1125 r1359 3338 3338 3339 3339 pBranchTarget = pCtx->edx; 3340 pBranchTarget = SELMToFlat(pVM, pCtx-> cs, &pCtx->csHid, pBranchTarget);3340 pBranchTarget = SELMToFlat(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid, pBranchTarget); 3341 3341 3342 3342 /* First we check if the duplicate function target lies in some existing function patch already. Will save some space. */ … … 3955 3955 && (pCtx->ss & X86_SEL_RPL) == 0) 3956 3956 { 3957 RTGCPTR pInstrGCFlat = SELMToFlat(pVM, pCtx-> cs, &pCtx->csHid, pInstrGC);3957 RTGCPTR pInstrGCFlat = SELMToFlat(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid, pInstrGC); 3958 3958 Assert(pInstrGCFlat == pInstrGC); 3959 3959 } … … 5907 5907 5908 5908 /* Return original address, correct by subtracting the CS base address. */ 5909 *ppNewEip = pNewEip - SELMToFlat(pVM, pCtx-> cs, &pCtx->csHid, 0);5909 *ppNewEip = pNewEip - SELMToFlat(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid, 0); 5910 5910 5911 5911 /* Reset the PATM stack. */ -
trunk/src/VBox/VMM/PATM/VMMGC/PATMGC.cpp
r1163 r1359 469 469 } 470 470 471 cpu.mode = SELMIsSelector32Bit(pVM, pRegFrame-> cs, 0) ? CPUMODE_32BIT : CPUMODE_16BIT;471 cpu.mode = SELMIsSelector32Bit(pVM, pRegFrame->eflags, pRegFrame->cs, 0) ? CPUMODE_32BIT : CPUMODE_16BIT; 472 472 if(cpu.mode != CPUMODE_32BIT) 473 473 {
Note:
See TracChangeset
for help on using the changeset viewer.