Changeset 9713 in vbox for trunk/src/VBox
- Timestamp:
- Jun 16, 2008 11:53:37 AM (17 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/EM.cpp
r9712 r9713 1240 1240 if (VBOX_SUCCESS(rc)) 1241 1241 { 1242 pCtx-> eip += Cpu.opsize;1242 pCtx->rip += Cpu.opsize; 1243 1243 STAM_PROFILE_STOP(&pVM->em.s.StatMiscEmu, a); 1244 1244 return rc; … … 1295 1295 */ 1296 1296 DISCPUSTATE Cpu; 1297 rc = CPUMR3DisasmInstrCPU(pVM, pCtx, pCtx-> eip, &Cpu, "IO EMU");1297 rc = CPUMR3DisasmInstrCPU(pVM, pCtx, pCtx->rip, &Cpu, "IO EMU"); 1298 1298 if (VBOX_SUCCESS(rc)) 1299 1299 { … … 1347 1347 if (IOM_SUCCESS(rc)) 1348 1348 { 1349 pCtx-> eip += Cpu.opsize;1349 pCtx->rip += Cpu.opsize; 1350 1350 STAM_PROFILE_STOP(&pVM->em.s.StatIOEmu, a); 1351 1351 return rc; … … 1419 1419 1420 1420 /* If MONITOR & MWAIT are supported, then interpret them here. */ 1421 rc = CPUMR3DisasmInstrCPU(pVM, pCtx, pCtx-> eip, &cpu, "Guest Trap (#UD): ");1421 rc = CPUMR3DisasmInstrCPU(pVM, pCtx, pCtx->rip, &cpu, "Guest Trap (#UD): "); 1422 1422 if ( VBOX_SUCCESS(rc) 1423 1423 && (cpu.pCurInstr->opcode == OP_MONITOR || cpu.pCurInstr->opcode == OP_MWAIT)) … … 1435 1435 if (VBOX_SUCCESS(rc)) 1436 1436 { 1437 pCtx-> eip += cpu.opsize;1437 pCtx->rip += cpu.opsize; 1438 1438 return rc; 1439 1439 } … … 1446 1446 DISCPUSTATE cpu; 1447 1447 1448 rc = CPUMR3DisasmInstrCPU(pVM, pCtx, pCtx-> eip, &cpu, "Guest Trap: ");1448 rc = CPUMR3DisasmInstrCPU(pVM, pCtx, pCtx->rip, &cpu, "Guest Trap: "); 1449 1449 if (VBOX_SUCCESS(rc) && (cpu.pCurInstr->optype & OPTYPE_PORTIO)) 1450 1450 { … … 1500 1500 * sysenter, syscall & callgate 1501 1501 */ 1502 rc = CPUMR3DisasmInstrCPU(pVM, pCtx, pCtx-> eip, &Cpu, "RSWITCH: ");1502 rc = CPUMR3DisasmInstrCPU(pVM, pCtx, pCtx->rip, &Cpu, "RSWITCH: "); 1503 1503 if (VBOX_SUCCESS(rc)) 1504 1504 { … … 1785 1785 int rc; 1786 1786 1787 rc = CPUMR3DisasmInstrCPU(pVM, pCtx, pCtx-> eip, &Cpu, "PRIV: ");1787 rc = CPUMR3DisasmInstrCPU(pVM, pCtx, pCtx->rip, &Cpu, "PRIV: "); 1788 1788 if (VBOX_SUCCESS(rc)) 1789 1789 { … … 1800 1800 case OP_CLI: 1801 1801 STAM_COUNTER_INC(&pStats->StatCli); 1802 emR3RecordCli(pVM, pCtx-> eip);1802 emR3RecordCli(pVM, pCtx->rip); 1803 1803 break; 1804 1804 case OP_STI: … … 1876 1876 pCtx->eflags.u32 &= ~X86_EFL_IF; 1877 1877 Assert(Cpu.opsize == 1); 1878 pCtx-> eip += Cpu.opsize;1878 pCtx->rip += Cpu.opsize; 1879 1879 STAM_PROFILE_STOP(&pVM->em.s.StatPrivEmu, a); 1880 1880 return VINF_EM_RESCHEDULE_REM; /* must go to the recompiler now! */ … … 1882 1882 case OP_STI: 1883 1883 pCtx->eflags.u32 |= X86_EFL_IF; 1884 EMSetInhibitInterruptsPC(pVM, pCtx-> eip + Cpu.opsize);1884 EMSetInhibitInterruptsPC(pVM, pCtx->rip + Cpu.opsize); 1885 1885 Assert(Cpu.opsize == 1); 1886 pCtx-> eip += Cpu.opsize;1886 pCtx->rip += Cpu.opsize; 1887 1887 STAM_PROFILE_STOP(&pVM->em.s.StatPrivEmu, a); 1888 1888 return VINF_SUCCESS; … … 1924 1924 if (VBOX_SUCCESS(rc)) 1925 1925 { 1926 pCtx-> eip += Cpu.opsize;1926 pCtx->rip += Cpu.opsize; 1927 1927 STAM_PROFILE_STOP(&pVM->em.s.StatPrivEmu, a); 1928 1928 … … 2370 2370 /* Prefetch pages for EIP and ESP */ 2371 2371 /** @todo This is rather expensive. Should investigate if it really helps at all. */ 2372 rc = PGMPrefetchPage(pVM, SELMToFlat(pVM, DIS_SELREG_CS, CPUMCTX2CORE(pCtx), pCtx-> eip));2372 rc = PGMPrefetchPage(pVM, SELMToFlat(pVM, DIS_SELREG_CS, CPUMCTX2CORE(pCtx), pCtx->rip)); 2373 2373 if (rc == VINF_SUCCESS) 2374 rc = PGMPrefetchPage(pVM, SELMToFlat(pVM, DIS_SELREG_SS, CPUMCTX2CORE(pCtx), pCtx-> esp));2374 rc = PGMPrefetchPage(pVM, SELMToFlat(pVM, DIS_SELREG_SS, CPUMCTX2CORE(pCtx), pCtx->rsp)); 2375 2375 if (rc != VINF_SUCCESS) 2376 2376 { … … 2635 2635 PCPUMCTX pCtx = pVM->em.s.pCtx; 2636 2636 2637 LogFlow(("emR3HwAccExecute: (cs:eip=%04x:% 08x)\n", pCtx->cs, pCtx->eip));2637 LogFlow(("emR3HwAccExecute: (cs:eip=%04x:%VGv)\n", pCtx->cs, pCtx->rip)); 2638 2638 *pfFFDone = false; 2639 2639 -
trunk/src/VBox/VMM/VMMAll/EMAll.cpp
r9675 r9713 143 143 { 144 144 RTGCPTR GCPtrInstr; 145 int rc = SELMValidateAndConvertCSAddr(pVM, pCtxCore->eflags, pCtxCore->ss, pCtxCore->cs, (PCPUMSELREGHID)&pCtxCore->csHid, (RTGCPTR)pCtxCore-> eip, &GCPtrInstr);145 int rc = SELMValidateAndConvertCSAddr(pVM, pCtxCore->eflags, pCtxCore->ss, pCtxCore->cs, (PCPUMSELREGHID)&pCtxCore->csHid, (RTGCPTR)pCtxCore->rip, &GCPtrInstr); 146 146 if (VBOX_FAILURE(rc)) 147 147 { 148 Log(("EMInterpretDisasOne: Failed to convert %RTsel:% RX32(cpl=%d) - rc=%Vrc !!\n",149 pCtxCore->cs, pCtxCore-> eip, pCtxCore->ss & X86_SEL_RPL, rc));148 Log(("EMInterpretDisasOne: Failed to convert %RTsel:%VGv (cpl=%d) - rc=%Vrc !!\n", 149 pCtxCore->cs, pCtxCore->rip, pCtxCore->ss & X86_SEL_RPL, rc)); 150 150 return rc; 151 151 } … … 203 203 RTGCPTR pbCode; 204 204 205 LogFlow(("EMInterpretInstruction %V Rv fault %VGv\n", pRegFrame->eip, pvFault));206 int rc = SELMValidateAndConvertCSAddr(pVM, pRegFrame->eflags, pRegFrame->ss, pRegFrame->cs, &pRegFrame->csHid, (RTGCPTR)pRegFrame-> eip, &pbCode);205 LogFlow(("EMInterpretInstruction %VGv fault %VGv\n", pRegFrame->rip, pvFault)); 206 int rc = SELMValidateAndConvertCSAddr(pVM, pRegFrame->eflags, pRegFrame->ss, pRegFrame->cs, &pRegFrame->csHid, (RTGCPTR)pRegFrame->rip, &pbCode); 207 207 if (VBOX_SUCCESS(rc)) 208 208 { … … 217 217 if (VBOX_SUCCESS(rc)) 218 218 { 219 pRegFrame-> eip += cbOp; /* Move on to the next instruction. */219 pRegFrame->rip += cbOp; /* Move on to the next instruction. */ 220 220 } 221 221 return rc; … … 281 281 int rc = IOMGCIOPortHandler(pVM, pCtxCore, pCpu); 282 282 if (IOM_SUCCESS(rc)) 283 pCtxCore-> eip += cbOp;283 pCtxCore->rip += cbOp; 284 284 return rc; 285 285 #else … … 731 731 if (pCpu->param1.size < pCpu->param2.size) 732 732 { 733 AssertMsgFailed(("%s at %VGv parameter mismatch %d vs %d!!\n", pszInstr, pRegFrame-> eip, pCpu->param1.size, pCpu->param2.size)); /* should never happen! */733 AssertMsgFailed(("%s at %VGv parameter mismatch %d vs %d!!\n", pszInstr, pRegFrame->rip, pCpu->param1.size, pCpu->param2.size)); /* should never happen! */ 734 734 return VERR_EM_INTERPRETER; 735 735 } … … 747 747 #ifdef IN_GC 748 748 /* Safety check (in theory it could cross a page boundary and fault there though) */ 749 AssertMsgReturn(pParam1 == pvFault, ("eip=%VGv, pParam1=%VGv pvFault=%VGv\n", pRegFrame-> eip, pParam1, pvFault), VERR_EM_INTERPRETER);749 AssertMsgReturn(pParam1 == pvFault, ("eip=%VGv, pParam1=%VGv pvFault=%VGv\n", pRegFrame->rip, pParam1, pvFault), VERR_EM_INTERPRETER); 750 750 #endif 751 751 rc = emRamRead(pVM, &valpar1, pParam1, param1.size); … … 816 816 { 817 817 AssertMsgReturn(pCpu->param1.size >= pCpu->param2.size, /* should never happen! */ 818 ("%s at %VGv parameter mismatch %d vs %d!!\n", emGetMnemonic(pCpu), pRegFrame-> eip, pCpu->param1.size, pCpu->param2.size),818 ("%s at %VGv parameter mismatch %d vs %d!!\n", emGetMnemonic(pCpu), pRegFrame->rip, pCpu->param1.size, pCpu->param2.size), 819 819 VERR_EM_INTERPRETER); 820 820 … … 833 833 Assert( TRPMHasTrap(pVM) 834 834 && (TRPMGetErrorCode(pVM) & X86_TRAP_PF_RW)); 835 AssertMsgReturn(GCPtrPar1 == pvFault, ("eip=%VGv, GCPtrPar1=%VGv pvFault=%VGv\n", pRegFrame-> eip, GCPtrPar1, pvFault), VERR_EM_INTERPRETER);835 AssertMsgReturn(GCPtrPar1 == pvFault, ("eip=%VGv, GCPtrPar1=%VGv pvFault=%VGv\n", pRegFrame->rip, GCPtrPar1, pvFault), VERR_EM_INTERPRETER); 836 836 # endif 837 837 … … 905 905 if (pCpu->param1.size < pCpu->param2.size) 906 906 { 907 AssertMsgFailed(("%s at %VGv parameter mismatch %d vs %d!!\n", pszInstr, pRegFrame-> eip, pCpu->param1.size, pCpu->param2.size)); /* should never happen! */907 AssertMsgFailed(("%s at %VGv parameter mismatch %d vs %d!!\n", pszInstr, pRegFrame->rip, pCpu->param1.size, pCpu->param2.size)); /* should never happen! */ 908 908 return VERR_EM_INTERPRETER; 909 909 } … … 1194 1194 1195 1195 default: 1196 Log(("emInterpretMov: unexpected type=%d eip=%V Rv\n", param2.type, pRegFrame->eip));1196 Log(("emInterpretMov: unexpected type=%d eip=%VGv\n", param2.type, pRegFrame->rip)); 1197 1197 return VERR_EM_INTERPRETER; 1198 1198 } 1199 1199 #ifdef LOG_ENABLED 1200 1200 if (pCpu->mode == CPUMODE_64BIT) 1201 LogFlow(("EMInterpretInstruction at % 08x: OP_MOV %VGv <- %RX64 (%d) &val32=%08x\n", pRegFrame->eip, pDest, val64, param2.size, &val64));1201 LogFlow(("EMInterpretInstruction at %VGv: OP_MOV %VGv <- %RX64 (%d) &val32=%08x\n", pRegFrame->rip, pDest, val64, param2.size, &val64)); 1202 1202 else 1203 LogFlow(("EMInterpretInstruction at % 08x: OP_MOV %VGv <- %08X (%d) &val32=%08x\n", pRegFrame->eip, pDest, (uint32_t)val64, param2.size, &val64));1203 LogFlow(("EMInterpretInstruction at %VGv: OP_MOV %VGv <- %08X (%d) &val32=%08x\n", pRegFrame->rip, pDest, (uint32_t)val64, param2.size, &val64)); 1204 1204 #endif 1205 1205 … … 1209 1209 #ifdef IN_GC 1210 1210 /* Safety check (in theory it could cross a page boundary and fault there though) */ 1211 AssertMsgReturn(pDest == pvFault, ("eip=%VGv pDest=%VGv pvFault=%VGv\n", pRegFrame-> eip, pDest, pvFault), VERR_EM_INTERPRETER);1211 AssertMsgReturn(pDest == pvFault, ("eip=%VGv pDest=%VGv pvFault=%VGv\n", pRegFrame->rip, pDest, pvFault), VERR_EM_INTERPRETER); 1212 1212 #endif 1213 1213 #endif … … 1328 1328 1329 1329 /* Safety check (in theory it could cross a page boundary and fault there though) */ 1330 AssertMsgReturn(pParam1 == (RTRCPTR)pvFault, ("eip=%V Rv pParam1=%VRv pvFault=%VGv\n", pRegFrame->eip, pParam1, pvFault), VERR_EM_INTERPRETER);1330 AssertMsgReturn(pParam1 == (RTRCPTR)pvFault, ("eip=%VGv pParam1=%VRv pvFault=%VGv\n", pRegFrame->rip, pParam1, pvFault), VERR_EM_INTERPRETER); 1331 1331 break; 1332 1332 … … 1410 1410 1411 1411 /* Safety check (in theory it could cross a page boundary and fault there though) */ 1412 AssertMsgReturn(pParam1 == (RTRCPTR)pvFault, ("eip=%V Rv pParam1=%VRv pvFault=%VGv\n", pRegFrame->eip, pParam1, pvFault), VERR_EM_INTERPRETER);1412 AssertMsgReturn(pParam1 == (RTRCPTR)pvFault, ("eip=%VGv pParam1=%VRv pvFault=%VGv\n", pRegFrame->rip, pParam1, pvFault), VERR_EM_INTERPRETER); 1413 1413 break; 1414 1414 … … 1485 1485 1486 1486 /* Safety check (in theory it could cross a page boundary and fault there though) */ 1487 AssertMsgReturn(pParam1 == (RTRCPTR)pvFault, ("eip=%V Rv pParam1=%VRv pvFault=%VGv\n", pRegFrame->eip, pParam1, pvFault), VERR_EM_INTERPRETER);1487 AssertMsgReturn(pParam1 == (RTRCPTR)pvFault, ("eip=%VGv pParam1=%VRv pvFault=%VGv\n", pRegFrame->rip, pParam1, pvFault), VERR_EM_INTERPRETER); 1488 1488 break; 1489 1489 … … 2029 2029 2030 2030 Assert(pRegFrame->eflags.u32 & X86_EFL_IF); 2031 Assert(pvFault == SELMToFlat(pVM, DIS_SELREG_CS, pRegFrame, (RTGCPTR)pRegFrame-> eip));2031 Assert(pvFault == SELMToFlat(pVM, DIS_SELREG_CS, pRegFrame, (RTGCPTR)pRegFrame->rip)); 2032 2032 2033 2033 pVM->em.s.GCPtrInhibitInterrupts = pRegFrame->eip + pCpu->opsize; -
trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp
r9678 r9713 945 945 { 946 946 STAM_PROFILE_START(&pVM->iom.s.StatGCMMIOHandler, a); 947 Log3(("IOMMMIOHandler: GCPhys=%RGp uErr=%#x pvFault=%VGv eip=% RGv\n",948 GCPhysFault, (uint32_t)uErrorCode, pvFault, pCtxCore-> eip));947 Log3(("IOMMMIOHandler: GCPhys=%RGp uErr=%#x pvFault=%VGv eip=%VGv\n", 948 GCPhysFault, (uint32_t)uErrorCode, pvFault, pCtxCore->rip)); 949 949 950 950 PIOMMMIORANGE pRange = (PIOMMMIORANGE)pvUser; … … 1078 1078 */ 1079 1079 if (rc == VINF_SUCCESS) 1080 pCtxCore-> eip += cbOp;1080 pCtxCore->rip += cbOp; 1081 1081 else 1082 1082 { -
trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp
r9649 r9713 98 98 * adding this kind of detection to DIS or EM. */ 99 99 case OP_MOV: 100 pRegFrame-> eip += cbOp;100 pRegFrame->rip += cbOp; 101 101 STAM_COUNTER_INC(&pVM->pgm.s.StatGCGuestROMWriteHandled); 102 102 return VINF_SUCCESS; -
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r9699 r9713 618 618 int rc2 = EMInterpretInstructionCPU(pVM, pCpu, pRegFrame, pvFault, &cbWritten); 619 619 if (VBOX_SUCCESS(rc2)) 620 pRegFrame-> eip += pCpu->opsize;620 pRegFrame->rip += pCpu->opsize; 621 621 else if (rc2 == VERR_EM_INTERPRETER) 622 622 { … … 690 690 pRegFrame->ecx--; 691 691 } 692 pRegFrame-> eip += pCpu->opsize;692 pRegFrame->rip += pCpu->opsize; 693 693 694 694 /* See use in pgmPoolAccessHandlerSimple(). */ … … 733 733 int rc = EMInterpretInstructionCPU(pVM, pCpu, pRegFrame, pvFault, &cb); 734 734 if (VBOX_SUCCESS(rc)) 735 pRegFrame-> eip += pCpu->opsize;735 pRegFrame->rip += pCpu->opsize; 736 736 else if (rc == VERR_EM_INTERPRETER) 737 737 { 738 738 LogFlow(("pgmPoolAccessHandlerPTWorker: Interpretation failed for patch code %04x:%RGv - opcode=%d\n", 739 pRegFrame->cs, (RTGCPTR)pRegFrame-> eip, pCpu->pCurInstr->opcode));739 pRegFrame->cs, (RTGCPTR)pRegFrame->rip, pCpu->pCurInstr->opcode)); 740 740 rc = VINF_EM_RAW_EMULATE_INSTR; 741 741 STAM_COUNTER_INC(&pPool->CTXMID(StatMonitor,EmulateInstr)); … … 836 836 /* REP prefix, don't bother. */ 837 837 STAM_COUNTER_INC(&pPool->CTXMID(StatMonitor,RepPrefix)); 838 Log4(("pgmPoolAccessHandler: eax=%#x ecx=%#x edi=%#x esi=%#x eip=% #xopcode=%d prefix=%#x\n",839 pRegFrame->eax, pRegFrame->ecx, pRegFrame->edi, pRegFrame->esi, pRegFrame-> eip, Cpu.pCurInstr->opcode, Cpu.prefix));838 Log4(("pgmPoolAccessHandler: eax=%#x ecx=%#x edi=%#x esi=%#x eip=%VGv opcode=%d prefix=%#x\n", 839 pRegFrame->eax, pRegFrame->ecx, pRegFrame->edi, pRegFrame->esi, pRegFrame->rip, Cpu.pCurInstr->opcode, Cpu.prefix)); 840 840 } 841 841 -
trunk/src/VBox/VMM/VMMGC/TRPMGCHandlersA.asm
r9300 r9713 271 271 mov eax, [esp + 08h + ESPOFF] ; eip 272 272 mov [esp + CPUMCTXCORE.eip], eax 273 %if GC_ARCH_BITS == 64 274 ; zero out the high dword 275 mov dword [esp + CPUMCTXCORE.eip + 4], 0 276 %endif 273 277 mov eax, [esp + 10h + ESPOFF] ; eflags 274 278 mov [esp + CPUMCTXCORE.eflags], eax … … 750 754 mov eax, [esp + 04h + ESPOFF] ; eip 751 755 mov [esp + CPUMCTXCORE.eip], eax 756 %if GC_ARCH_BITS == 64 757 ; zero out the high dword 758 mov dword [esp + CPUMCTXCORE.eip + 4], 0 759 %endif 752 760 mov eax, dword [esp + 08h + ESPOFF] ; cs 753 761 mov [esp + CPUMCTXCORE.cs], eax … … 1049 1057 mov eax, [ecx + VBOXTSS.eip] 1050 1058 mov [esp + CPUMCTXCORE.eip], eax 1059 %if GC_ARCH_BITS == 64 1060 ; zero out the high dword 1061 mov dword [esp + CPUMCTXCORE.eip + 4], 0 1062 %endif 1051 1063 mov eax, [ecx + VBOXTSS.eflags] 1052 1064 mov [esp + CPUMCTXCORE.eflags], eax
Note:
See TracChangeset
for help on using the changeset viewer.