Changeset 97209 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Oct 18, 2022 2:37:10 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 154185
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/HMSVMAll.cpp
r96407 r97209 68 68 Log4(("Emulated VMMCall TPR access replacement at RIP=%RGv\n", pCtx->rip)); 69 69 70 AssertCompile(DISGREG_EAX == X86_GREG_xAX); 71 AssertCompile(DISGREG_ECX == X86_GREG_xCX); 72 AssertCompile(DISGREG_EDX == X86_GREG_xDX); 73 AssertCompile(DISGREG_EBX == X86_GREG_xBX); 74 AssertCompile(DISGREG_ESP == X86_GREG_xSP); 75 AssertCompile(DISGREG_EBP == X86_GREG_xBP); 76 AssertCompile(DISGREG_ESI == X86_GREG_xSI); 77 AssertCompile(DISGREG_EDI == X86_GREG_xDI); 78 AssertCompile(DISGREG_R8D == X86_GREG_x8); 79 AssertCompile(DISGREG_R9D == X86_GREG_x9); 80 AssertCompile(DISGREG_R10D == X86_GREG_x10); 81 AssertCompile(DISGREG_R11D == X86_GREG_x11); 82 AssertCompile(DISGREG_R12D == X86_GREG_x12); 83 AssertCompile(DISGREG_R13D == X86_GREG_x13); 84 AssertCompile(DISGREG_R14D == X86_GREG_x14); 85 AssertCompile(DISGREG_R15D == X86_GREG_x15); 86 70 87 /* 71 88 * We do this in a loop as we increment the RIP after a successful emulation … … 89 106 AssertRC(rc); 90 107 91 rc = DISWriteReg32(CPUMCTX2CORE(pCtx), pPatch->uDstOperand, u8Tpr); 92 AssertRC(rc); 108 uint8_t idxReg = pPatch->uDstOperand; 109 AssertStmt(idxReg < RT_ELEMENTS(pCtx->aGRegs), idxReg = RT_ELEMENTS(pCtx->aGRegs) - 1); 110 pCtx->aGRegs[idxReg].u64 = u8Tpr; 93 111 pCtx->rip += pPatch->cbOp; 94 112 pCtx->eflags.Bits.u1RF = 0; … … 101 119 if (pPatch->enmType == HMTPRINSTR_WRITE_REG) 102 120 { 103 uint32_t u32Val; 104 int rc = DISFetchReg32(CPUMCTX2CORE(pCtx), pPatch->uSrcOperand, &u32Val); 105 AssertRC(rc); 106 u8Tpr = u32Val; 121 uint8_t idxReg = pPatch->uDstOperand; 122 AssertStmt(idxReg < RT_ELEMENTS(pCtx->aGRegs), idxReg = RT_ELEMENTS(pCtx->aGRegs) - 1); 123 u8Tpr = pCtx->aGRegs[idxReg].u8; 107 124 } 108 125 else
Note:
See TracChangeset
for help on using the changeset viewer.