Changeset 98066 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Jan 12, 2023 4:50:30 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/NEMAllNativeTemplate-win.cpp.h
r97227 r98066 1779 1779 /* 1780 1780 * Soak up state and execute the instruction. 1781 *1782 * Note! If this grows slightly more complicated, combine into an IEMExecDecodedCpuId1783 * function and make everyone use it.1784 1781 */ 1785 /** @todo Combine implementations into IEMExecDecodedCpuId as this will1786 * only get weirder with nested VT-x and AMD-V support. */1787 1782 nemR3WinCopyStateFromX64Header(pVCpu, &pExit->VpContext); 1788 1789 /* Copy in the low register values (top is always cleared). */ 1790 pVCpu->cpum.GstCtx.rax = (uint32_t)pExit->CpuidAccess.Rax; 1791 pVCpu->cpum.GstCtx.rcx = (uint32_t)pExit->CpuidAccess.Rcx; 1792 pVCpu->cpum.GstCtx.rdx = (uint32_t)pExit->CpuidAccess.Rdx; 1793 pVCpu->cpum.GstCtx.rbx = (uint32_t)pExit->CpuidAccess.Rbx; 1794 pVCpu->cpum.GstCtx.fExtrn &= ~(CPUMCTX_EXTRN_RAX | CPUMCTX_EXTRN_RCX | CPUMCTX_EXTRN_RDX | CPUMCTX_EXTRN_RBX); 1795 1796 /* Get the correct values. */ 1797 CPUMGetGuestCpuId(pVCpu, pVCpu->cpum.GstCtx.eax, pVCpu->cpum.GstCtx.ecx, pVCpu->cpum.GstCtx.cs.Attr.n.u1Long, 1798 &pVCpu->cpum.GstCtx.eax, &pVCpu->cpum.GstCtx.ebx, &pVCpu->cpum.GstCtx.ecx, &pVCpu->cpum.GstCtx.edx); 1799 1800 Log4(("CpuIdExit/%u: %04x:%08RX64/%s: rax=%08RX64 / rcx=%08RX64 / rdx=%08RX64 / rbx=%08RX64 -> %08RX32 / %08RX32 / %08RX32 / %08RX32 (hv: %08RX64 / %08RX64 / %08RX64 / %08RX64)\n", 1801 pVCpu->idCpu, pExit->VpContext.Cs.Selector, pExit->VpContext.Rip, nemR3WinExecStateToLogStr(&pExit->VpContext), 1802 pExit->CpuidAccess.Rax, pExit->CpuidAccess.Rcx, pExit->CpuidAccess.Rdx, pExit->CpuidAccess.Rbx, 1803 pVCpu->cpum.GstCtx.eax, pVCpu->cpum.GstCtx.ecx, pVCpu->cpum.GstCtx.edx, pVCpu->cpum.GstCtx.ebx, 1804 pExit->CpuidAccess.DefaultResultRax, pExit->CpuidAccess.DefaultResultRcx, pExit->CpuidAccess.DefaultResultRdx, pExit->CpuidAccess.DefaultResultRbx)); 1805 1806 /* Move RIP and we're done. */ 1807 nemR3WinAdvanceGuestRipAndClearRF(pVCpu, &pExit->VpContext, 2); 1783 VBOXSTRICTRC rcStrict = nemHCWinImportStateIfNeededStrict(pVCpu, 1784 IEM_CPUMCTX_EXTRN_EXEC_DECODED_NO_MEM_MASK 1785 | CPUMCTX_EXTRN_CR3, /* May call PGMChangeMode() requiring cr3 (due to cr0 being imported). */ 1786 "CPUID"); 1787 if (rcStrict == VINF_SUCCESS) 1788 { 1789 /* Copy in the low register values (top is always cleared). */ 1790 pVCpu->cpum.GstCtx.rax = (uint32_t)pExit->CpuidAccess.Rax; 1791 pVCpu->cpum.GstCtx.rcx = (uint32_t)pExit->CpuidAccess.Rcx; 1792 pVCpu->cpum.GstCtx.rdx = (uint32_t)pExit->CpuidAccess.Rdx; 1793 pVCpu->cpum.GstCtx.rbx = (uint32_t)pExit->CpuidAccess.Rbx; 1794 pVCpu->cpum.GstCtx.fExtrn &= ~(CPUMCTX_EXTRN_RAX | CPUMCTX_EXTRN_RCX | CPUMCTX_EXTRN_RDX | CPUMCTX_EXTRN_RBX); 1795 1796 /* Execute the decoded instruction. */ 1797 rcStrict = IEMExecDecodedCpuid(pVCpu, pExit->VpContext.InstructionLength); 1798 1799 Log4(("CpuIdExit/%u: %04x:%08RX64/%s: rax=%08RX64 / rcx=%08RX64 / rdx=%08RX64 / rbx=%08RX64 -> %08RX32 / %08RX32 / %08RX32 / %08RX32 (hv: %08RX64 / %08RX64 / %08RX64 / %08RX64)\n", 1800 pVCpu->idCpu, pExit->VpContext.Cs.Selector, pExit->VpContext.Rip, nemR3WinExecStateToLogStr(&pExit->VpContext), 1801 pExit->CpuidAccess.Rax, pExit->CpuidAccess.Rcx, pExit->CpuidAccess.Rdx, pExit->CpuidAccess.Rbx, 1802 pVCpu->cpum.GstCtx.eax, pVCpu->cpum.GstCtx.ecx, pVCpu->cpum.GstCtx.edx, pVCpu->cpum.GstCtx.ebx, 1803 pExit->CpuidAccess.DefaultResultRax, pExit->CpuidAccess.DefaultResultRcx, pExit->CpuidAccess.DefaultResultRdx, pExit->CpuidAccess.DefaultResultRbx)); 1804 } 1808 1805 1809 1806 RT_NOREF_PV(pVM); 1810 return VINF_SUCCESS;1807 return rcStrict; 1811 1808 } 1812 1809
Note:
See TracChangeset
for help on using the changeset viewer.