Changeset 41906 in vbox for trunk/src/VBox/VMM/VMMAll/EMAll.cpp
- Timestamp:
- Jun 24, 2012 3:44:03 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 78759
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/EMAll.cpp
r41830 r41906 384 384 #else 385 385 /** @todo Get the CPU mode as well while we're at it! */ 386 int rc = SELMValidateAndConvertCSAddr(pVCpu, pCtxCore->eflags, pCtxCore->ss , pCtxCore->cs,387 &pCtxCore->cs Hid, pCtxCore->rip, &GCPtrInstr);386 int rc = SELMValidateAndConvertCSAddr(pVCpu, pCtxCore->eflags, pCtxCore->ss.Sel, pCtxCore->cs.Sel, 387 &pCtxCore->cs, pCtxCore->rip, &GCPtrInstr); 388 388 #endif 389 389 if (RT_FAILURE(rc)) 390 390 { 391 391 Log(("EMInterpretDisasOne: Failed to convert %RTsel:%RGv (cpl=%d) - rc=%Rrc !!\n", 392 pCtxCore->cs , (RTGCPTR)pCtxCore->rip, pCtxCore->ss& X86_SEL_RPL, rc));392 pCtxCore->cs.Sel, (RTGCPTR)pCtxCore->rip, pCtxCore->ss.Sel & X86_SEL_RPL, rc)); 393 393 return rc; 394 394 } … … 415 415 PDISCPUSTATE pDis, unsigned *pcbInstr) 416 416 { 417 DISCPUMODE enmCpuMode = SELMGetCpuModeFromSelector(pVCpu, pCtxCore->eflags, pCtxCore->cs , (PCPUMSELREGHID)&pCtxCore->csHid);417 DISCPUMODE enmCpuMode = SELMGetCpuModeFromSelector(pVCpu, pCtxCore->eflags, pCtxCore->cs.Sel, (PCPUMSELREGHID)&pCtxCore->cs); 418 418 /** @todo Deal with too long instruction (=> \#GP), opcode read errors (=> 419 419 * \#PF, \#GP, \#??), undefined opcodes (=> \#UD), and such. */ … … 461 461 uint32_t cbOp; 462 462 PDISCPUSTATE pDis = &pVCpu->em.s.DisState; 463 pDis->uCpuMode = SELMGetCpuModeFromSelector(pVCpu, pRegFrame->eflags, pRegFrame->cs , &pRegFrame->csHid);463 pDis->uCpuMode = SELMGetCpuModeFromSelector(pVCpu, pRegFrame->eflags, pRegFrame->cs.Sel, &pRegFrame->cs); 464 464 rc = emDisCoreOne(pVCpu->CTX_SUFF(pVM), pVCpu, pDis, (RTGCUINTPTR)pbCode, &cbOp); 465 465 if (RT_SUCCESS(rc)) … … 515 515 uint32_t cbOp; 516 516 PDISCPUSTATE pDis = &pVCpu->em.s.DisState; 517 pDis->uCpuMode = SELMGetCpuModeFromSelector(pVCpu, pRegFrame->eflags, pRegFrame->cs , &pRegFrame->csHid);517 pDis->uCpuMode = SELMGetCpuModeFromSelector(pVCpu, pRegFrame->eflags, pRegFrame->cs.Sel, &pRegFrame->cs); 518 518 rc = emDisCoreOne(pVCpu->CTX_SUFF(pVM), pVCpu, pDis, (RTGCUINTPTR)pbCode, &cbOp); 519 519 if (RT_SUCCESS(rc)) … … 625 625 AssertRCReturn(rc, VERR_EM_INTERPRETER); 626 626 627 pRegFrame->eip = eip & 0xffff;628 pRegFrame->cs 627 pRegFrame->eip = eip & 0xffff; 628 pRegFrame->cs.Sel = cs; 629 629 630 630 /* Mask away all reserved bits */ … … 635 635 Assert((pRegFrame->eflags.u32 & (X86_EFL_IF|X86_EFL_IOPL)) == X86_EFL_IF); 636 636 637 pRegFrame->esp = esp;638 pRegFrame->ss = ss;639 pRegFrame->ds = ds;640 pRegFrame->es = es;641 pRegFrame->fs = fs;642 pRegFrame->gs = gs;637 pRegFrame->esp = esp; 638 pRegFrame->ss.Sel = ss; 639 pRegFrame->ds.Sel = ds; 640 pRegFrame->es.Sel = es; 641 pRegFrame->fs.Sel = fs; 642 pRegFrame->gs.Sel = gs; 643 643 644 644 return VINF_SUCCESS; … … 926 926 { 927 927 /* Illegal to have an active 64 bits CS selector (AMD Arch. Programmer's Manual Volume 2: Table 14-5) */ 928 if (pRegFrame->cs Hid.Attr.n.u1Long)928 if (pRegFrame->cs.Attr.n.u1Long) 929 929 { 930 930 AssertMsgFailed(("Illegal enabling of paging with CS.u1Long = 1!!\n")); … … 1535 1535 1536 1536 /* Read stack value first */ 1537 if (SELMGetCpuModeFromSelector(pVCpu, pRegFrame->eflags, pRegFrame->ss , &pRegFrame->ssHid) == DISCPUMODE_16BIT)1537 if (SELMGetCpuModeFromSelector(pVCpu, pRegFrame->eflags, pRegFrame->ss.Sel, &pRegFrame->ss) == DISCPUMODE_16BIT) 1538 1538 return VERR_EM_INTERPRETER; /* No legacy 16 bits stuff here, please. */ 1539 1539 … … 2202 2202 if (!(pDis->fPrefix & DISPREFIX_REP)) 2203 2203 { 2204 LogFlow(("emInterpretStosWD dest=%04X:%RGv (%RGv) cbSize=%d\n", pRegFrame->es , GCOffset, GCDest, cbSize));2204 LogFlow(("emInterpretStosWD dest=%04X:%RGv (%RGv) cbSize=%d\n", pRegFrame->es.Sel, GCOffset, GCDest, cbSize)); 2205 2205 2206 2206 rc = emRamWrite(pVM, pVCpu, pRegFrame, GCDest, &pRegFrame->rax, cbSize); … … 2247 2247 } 2248 2248 2249 LogFlow(("emInterpretStosWD dest=%04X:%RGv (%RGv) cbSize=%d cTransfers=%x DF=%d\n", pRegFrame->es , GCOffset, GCDest, cbSize, cTransfers, pRegFrame->eflags.Bits.u1DF));2249 LogFlow(("emInterpretStosWD dest=%04X:%RGv (%RGv) cbSize=%d cTransfers=%x DF=%d\n", pRegFrame->es.Sel, GCOffset, GCDest, cbSize, cTransfers, pRegFrame->eflags.Bits.u1DF)); 2250 2250 /* Access verification first; we currently can't recover properly from traps inside this instruction */ 2251 2251 rc = PGMVerifyAccess(pVCpu, GCDest - ((offIncrement > 0) ? 0 : ((cTransfers-1) * cbSize)),
Note:
See TracChangeset
for help on using the changeset viewer.