Changeset 87552 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Feb 3, 2021 10:41:38 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 142579
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r87551 r87552 2472 2472 */ 2473 2473 if (pHostMsrLoad[i].u32Msr == MSR_K6_EFER) 2474 pHostMsrLoad[i].u64Value = pVCpu->CTX_SUFF(pVM)->hm.s.vmx.u64HostMsrEfer;2474 pHostMsrLoad[i].u64Value = g_uHmVmxHostMsrEfer; 2475 2475 else 2476 2476 pHostMsrLoad[i].u64Value = ASMRdMsr(pHostMsrLoad[i].u32Msr); … … 2710 2710 { 2711 2711 uint64_t const uHostEferMsr = ASMRdMsr(MSR_K6_EFER); 2712 uint64_t const uHostEferMsrCache = pVCpu->CTX_SUFF(pVM)->hm.s.vmx.u64HostMsrEfer;2712 uint64_t const uHostEferMsrCache = g_uHmVmxHostMsrEfer; 2713 2713 uint64_t uVmcsEferMsrVmcs; 2714 2714 int rc = VMXReadVmcs64(VMX_VMCS64_HOST_EFER_FULL, &uVmcsEferMsrVmcs); … … 2778 2778 pHostMsrLoad->u32Msr, pHostMsrLoad->u64Value, u64HostMsr, cMsrs)); 2779 2779 2780 /* Verify that cached host EFER MSR matches what's loaded the CPU. */2780 /* Verify that cached host EFER MSR matches what's loaded on the CPU. */ 2781 2781 bool const fIsEferMsr = RT_BOOL(pHostMsrLoad->u32Msr == MSR_K6_EFER); 2782 if (fIsEferMsr) 2783 { 2784 AssertMsgReturnVoid(u64HostMsr == pVCpu->CTX_SUFF(pVM)->hm.s.vmx.u64HostMsrEfer, 2785 ("Cached=%#RX64 ASMRdMsr=%#RX64 cMsrs=%u\n", 2786 pVCpu->CTX_SUFF(pVM)->hm.s.vmx.u64HostMsrEfer, u64HostMsr, cMsrs)); 2787 } 2782 AssertMsgReturnVoid(!fIsEferMsr || u64HostMsr == g_uHmVmxHostMsrEfer, 2783 ("Cached=%#RX64 ASMRdMsr=%#RX64 cMsrs=%u\n", g_uHmVmxHostMsrEfer, u64HostMsr, cMsrs)); 2788 2784 2789 2785 /* Verify that the accesses are as expected in the MSR bitmap for auto-load/store MSRs. */ … … 4885 4881 if (pVM->hm.s.vmx.fSupportsVmcsEfer) 4886 4882 { 4887 rc = VMXWriteVmcs64(VMX_VMCS64_HOST_EFER_FULL, pVM->hm.s.vmx.u64HostMsrEfer);4883 rc = VMXWriteVmcs64(VMX_VMCS64_HOST_EFER_FULL, g_uHmVmxHostMsrEfer); 4888 4884 AssertRC(rc); 4889 4885 } … … 4915 4911 PCCPUMCTX pCtx = &pVCpu->cpum.GstCtx; 4916 4912 PVMCC pVM = pVCpu->CTX_SUFF(pVM); 4917 uint64_t const u64HostEfer = pVM->hm.s.vmx.u64HostMsrEfer;4913 uint64_t const u64HostEfer = g_uHmVmxHostMsrEfer; 4918 4914 uint64_t const u64GuestEfer = pCtx->msrEFER; 4919 4915
Note:
See TracChangeset
for help on using the changeset viewer.