Changeset 87552 in vbox
- Timestamp:
- Feb 3, 2021 10:41:38 AM (4 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 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 -
trunk/src/VBox/VMM/include/HMInternal.h
r87550 r87552 511 511 uint32_t cPleWindowTicks; 512 512 513 /** Host CR4 value (set by ring-0 VMX init )*/513 /** Host CR4 value (set by ring-0 VMX init, for logging). */ 514 514 uint64_t u64HostCr4; 515 /** Host SMM monitor control (set by ring-0 VMX init )*/515 /** Host SMM monitor control (set by ring-0 VMX init, for logging). */ 516 516 uint64_t u64HostSmmMonitorCtl; 517 /** Host EFER value (set by ring-0 VMX init )*/517 /** Host EFER value (set by ring-0 VMX init, for logging and guest NX). */ 518 518 uint64_t u64HostMsrEfer; 519 519 /** Whether the CPU supports VMCS fields for swapping EFER. */
Note:
See TracChangeset
for help on using the changeset viewer.