Changeset 9659 in vbox for trunk/src/VBox
- Timestamp:
- Jun 12, 2008 12:37:02 PM (17 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/EM.cpp
r9658 r9659 1508 1508 { 1509 1509 rc = PATMR3InstallPatch(pVM, SELMToFlat(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid, pCtx->eip), 1510 (SELMGet SelectorType(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid) == CPUMODE_32BIT) ? PATMFL_CODE32 : 0);1510 (SELMGetCpuModeFromSelector(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid) == CPUMODE_32BIT) ? PATMFL_CODE32 : 0); 1511 1511 if (VBOX_SUCCESS(rc)) 1512 1512 { … … 1759 1759 { 1760 1760 int rc = PATMR3InstallPatch(pVM, SELMToFlat(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid, pCtx->eip), 1761 (SELMGet SelectorType(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid) == CPUMODE_32BIT) ? PATMFL_CODE32 : 0);1761 (SELMGetCpuModeFromSelector(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid) == CPUMODE_32BIT) ? PATMFL_CODE32 : 0); 1762 1762 if (VBOX_SUCCESS(rc)) 1763 1763 { … … 1866 1866 if ( (pCtx->ss & X86_SEL_RPL) == 0 1867 1867 && !pCtx->eflags.Bits.u1VM 1868 && SELMGet SelectorType(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid) == CPUMODE_32BIT)1868 && SELMGetCpuModeFromSelector(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid) == CPUMODE_32BIT) 1869 1869 { 1870 1870 uint32_t size; … … 2109 2109 case VINF_PATM_HC_MMIO_PATCH_READ: 2110 2110 rc = PATMR3InstallPatch(pVM, SELMToFlat(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid, pCtx->eip), 2111 PATMFL_MMIO_ACCESS | ((SELMGet SelectorType(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid) == CPUMODE_32BIT) ? PATMFL_CODE32 : 0));2111 PATMFL_MMIO_ACCESS | ((SELMGetCpuModeFromSelector(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid) == CPUMODE_32BIT) ? PATMFL_CODE32 : 0)); 2112 2112 if (VBOX_FAILURE(rc)) 2113 2113 rc = emR3RawExecuteInstruction(pVM, "MMIO"); -
trunk/src/VBox/VMM/PATM/CSAM.cpp
r9658 r9659 2119 2119 2120 2120 /* Assuming 32 bits code for now. */ 2121 Assert(SELMGet SelectorType(pVM, fakeflags, Sel, pHiddenSel) == CPUMODE_32BIT);2121 Assert(SELMGetCpuModeFromSelector(pVM, fakeflags, Sel, pHiddenSel) == CPUMODE_32BIT); 2122 2122 2123 2123 pInstrGC = SELMToFlat(pVM, fakeflags, Sel, pHiddenSel, pInstrGC); -
trunk/src/VBox/VMM/PATM/VMMGC/PATMGC.cpp
r9658 r9659 510 510 } 511 511 512 cpu.mode = SELMGet SelectorType(pVM, pRegFrame->eflags, pRegFrame->cs, 0);512 cpu.mode = SELMGetCpuModeFromSelector(pVM, pRegFrame->eflags, pRegFrame->cs, 0); 513 513 if(cpu.mode != CPUMODE_32BIT) 514 514 { -
trunk/src/VBox/VMM/VMMAll/EMAll.cpp
r9658 r9659 167 167 EMDECL(int) EMInterpretDisasOneEx(PVM pVM, RTGCUINTPTR GCPtrInstr, PCCPUMCTXCORE pCtxCore, PDISCPUSTATE pCpu, unsigned *pcbInstr) 168 168 { 169 int rc = DISCoreOneEx(GCPtrInstr, SELMGet SelectorType(pVM, pCtxCore->eflags, pCtxCore->cs, (PCPUMSELREGHID)&pCtxCore->csHid),169 int rc = DISCoreOneEx(GCPtrInstr, SELMGetCpuModeFromSelector(pVM, pCtxCore->eflags, pCtxCore->cs, (PCPUMSELREGHID)&pCtxCore->csHid), 170 170 #ifdef IN_GC 171 171 NULL, NULL, … … 209 209 uint32_t cbOp; 210 210 DISCPUSTATE Cpu; 211 Cpu.mode = SELMGet SelectorType(pVM, pRegFrame->eflags, pRegFrame->cs, &pRegFrame->csHid);211 Cpu.mode = SELMGetCpuModeFromSelector(pVM, pRegFrame->eflags, pRegFrame->cs, &pRegFrame->csHid); 212 212 rc = emDisCoreOne(pVM, &Cpu, (RTGCUINTPTR)pbCode, &cbOp); 213 213 if (VBOX_SUCCESS(rc)) … … 631 631 632 632 /* Read stack value first */ 633 if (SELMGet SelectorType(pVM, pRegFrame->eflags, pRegFrame->ss, &pRegFrame->ssHid) == CPUMODE_16BIT)633 if (SELMGetCpuModeFromSelector(pVM, pRegFrame->eflags, pRegFrame->ss, &pRegFrame->ssHid) == CPUMODE_16BIT) 634 634 return VERR_EM_INTERPRETER; /* No legacy 16 bits stuff here, please. */ 635 635 -
trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp
r9658 r9659 302 302 { 303 303 cTransfers = pRegFrame->ecx; 304 if (SELMGet SelectorType(pVM, pRegFrame->eflags, pRegFrame->cs, &pRegFrame->csHid) == CPUMODE_16BIT)304 if (SELMGetCpuModeFromSelector(pVM, pRegFrame->eflags, pRegFrame->cs, &pRegFrame->csHid) == CPUMODE_16BIT) 305 305 cTransfers &= 0xffff; 306 306 … … 543 543 { 544 544 cTransfers = pRegFrame->ecx; 545 if (SELMGet SelectorType(pVM, pRegFrame->eflags, pRegFrame->cs, &pRegFrame->csHid) == CPUMODE_16BIT)545 if (SELMGetCpuModeFromSelector(pVM, pRegFrame->eflags, pRegFrame->cs, &pRegFrame->csHid) == CPUMODE_16BIT) 546 546 cTransfers &= 0xffff; 547 547 … … 1310 1310 cTransfers = pRegFrame->ecx; 1311 1311 1312 if (SELMGet SelectorType(pVM, pRegFrame->eflags, pRegFrame->cs, &pRegFrame->csHid) == CPUMODE_16BIT)1312 if (SELMGetCpuModeFromSelector(pVM, pRegFrame->eflags, pRegFrame->cs, &pRegFrame->csHid) == CPUMODE_16BIT) 1313 1313 cTransfers &= 0xffff; 1314 1314 … … 1465 1465 { 1466 1466 cTransfers = pRegFrame->ecx; 1467 if (SELMGet SelectorType(pVM, pRegFrame->eflags, pRegFrame->cs, &pRegFrame->csHid) == CPUMODE_16BIT)1467 if (SELMGetCpuModeFromSelector(pVM, pRegFrame->eflags, pRegFrame->cs, &pRegFrame->csHid) == CPUMODE_16BIT) 1468 1468 cTransfers &= 0xffff; 1469 1469 -
trunk/src/VBox/VMM/VMMAll/SELMAll.cpp
r9658 r9659 536 536 537 537 /** 538 * Return the selector type538 * Return the cpu mode corresponding to the (CS) selector 539 539 * 540 540 * @returns DISCPUMODE according to the selector type (16, 32 or 64 bits) … … 542 542 * @param Sel The selector. 543 543 */ 544 static DISCPUMODE selmGet SelectorType(PVM pVM, RTSEL Sel)544 static DISCPUMODE selmGetCpuModeFromSelector(PVM pVM, RTSEL Sel) 545 545 { 546 546 Assert(!CPUMAreHiddenSelRegsValid(pVM)); … … 561 561 562 562 /** 563 * Return the selector type563 * Return the cpu mode corresponding to the (CS) selector 564 564 * 565 565 * @returns DISCPUMODE according to the selector type (16, 32 or 64 bits) … … 569 569 * @param pHiddenSel The hidden selector register. 570 570 */ 571 SELMDECL(DISCPUMODE) SELMGet SelectorType(PVM pVM, X86EFLAGS eflags, RTSEL Sel, CPUMSELREGHID *pHiddenSel)571 SELMDECL(DISCPUMODE) SELMGetCpuModeFromSelector(PVM pVM, X86EFLAGS eflags, RTSEL Sel, CPUMSELREGHID *pHiddenSel) 572 572 { 573 573 if (!CPUMAreHiddenSelRegsValid(pVM)) … … 580 580 return CPUMODE_16BIT; 581 581 582 return selmGet SelectorType(pVM, Sel);582 return selmGetCpuModeFromSelector(pVM, Sel); 583 583 } 584 584 if ( CPUMIsGuestInLongMode(pVM) -
trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp
r9658 r9659 1880 1880 * Only allow 32-bit code. 1881 1881 */ 1882 if (SELMGet SelectorType(pVM, pRegFrame->eflags, pRegFrame->cs, &pRegFrame->csHid) == CPUMODE_16BIT)1882 if (SELMGetCpuModeFromSelector(pVM, pRegFrame->eflags, pRegFrame->cs, &pRegFrame->csHid) == CPUMODE_16BIT) 1883 1883 { 1884 1884 RTGCPTR pbCode; … … 1975 1975 * Only allow 32-bit code. 1976 1976 */ 1977 if (SELMGet SelectorType(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid))1977 if (SELMGetCpuModeFromSelector(pVM, pCtx->eflags, pCtx->cs, &pCtx->csHid)) 1978 1978 { 1979 1979 RTGCPTR pbCode;
Note:
See TracChangeset
for help on using the changeset viewer.