Changeset 102987 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Jan 22, 2024 10:07:42 AM (16 months ago)
- svn:sync-xref-src-repo-rev:
- 161219
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMR0.cpp
r101412 r102987 134 134 * module termination. */ 135 135 static bool g_fHmVmxCalledSUPR0EnableVTx = false; 136 /** VMX: Host CR0 value (set by ring-0 VMX init) */ 137 uint64_t g_uHmVmxHostCr0; 136 138 /** VMX: Host CR4 value (set by ring-0 VMX init) */ 137 139 uint64_t g_uHmVmxHostCr4; … … 140 142 /** VMX: Host SMM monitor control (used for logging/diagnostics) */ 141 143 uint64_t g_uHmVmxHostSmmMonitorCtl; 144 /** VMX: Host core capabilities (set by ring-0 VMX init) */ 145 uint64_t g_uHmVmxHostCoreCap; 146 /** VMX: Host memory control register (set by ring-0 VMX init) */ 147 uint64_t g_uHmVmxHostMemoryCtrl; 142 148 143 149 … … 460 466 { 461 467 /* Read CR4 and EFER for logging/diagnostic purposes. */ 468 g_uHmVmxHostCr0 = ASMGetCR0(); 462 469 g_uHmVmxHostCr4 = ASMGetCR4(); 463 470 g_uHmVmxHostMsrEfer = ASMRdMsr(MSR_K6_EFER); … … 474 481 if (RT_BF_GET(uVmxBasicMsr, VMX_BF_BASIC_DUAL_MON)) 475 482 g_uHmVmxHostSmmMonitorCtl = ASMRdMsr(MSR_IA32_SMM_MONITOR_CTL); 483 484 /* 485 * Host core and memory capabilities MSRs. 486 * Primarily for logging split-lock disable status. 487 */ 488 uint32_t uDummy, uStdExtFeatEdx; 489 ASMCpuId_Idx_ECX(7, 0, &uDummy, &uDummy, &uDummy, &uStdExtFeatEdx); 490 if (uStdExtFeatEdx & X86_CPUID_STEXT_FEATURE_EDX_CORECAP) 491 { 492 g_uHmVmxHostCoreCap = ASMRdMsr(MSR_IA32_CORE_CAPABILITIES); 493 if (g_uHmVmxHostCoreCap & MSR_IA32_CORE_CAP_SPLIT_LOCK_DISABLE) 494 g_uHmVmxHostMemoryCtrl = ASMRdMsr(MSR_MEMORY_CTRL); 495 } 476 496 477 497 /* Initialize VPID - 16 bits ASID. */ … … 1233 1253 pVM->hm.s.vmx.fUsePreemptTimerCfg = pVM->hmr0.s.vmx.fUsePreemptTimer; 1234 1254 pVM->hm.s.vmx.cPreemptTimerShift = g_cHmVmxPreemptTimerShift; 1255 pVM->hm.s.ForR3.vmx.u64HostCr0 = g_uHmVmxHostCr0; 1235 1256 pVM->hm.s.ForR3.vmx.u64HostCr4 = g_uHmVmxHostCr4; 1236 1257 pVM->hm.s.ForR3.vmx.u64HostMsrEfer = g_uHmVmxHostMsrEfer; 1237 1258 pVM->hm.s.ForR3.vmx.u64HostSmmMonitorCtl = g_uHmVmxHostSmmMonitorCtl; 1259 pVM->hm.s.ForR3.vmx.u64HostCoreCap = g_uHmVmxHostCoreCap; 1260 pVM->hm.s.ForR3.vmx.u64HostMemoryCtrl = g_uHmVmxHostMemoryCtrl; 1238 1261 pVM->hm.s.ForR3.vmx.u64HostFeatCtrl = g_HmMsrs.u.vmx.u64FeatCtrl; 1239 1262 HMGetVmxMsrsFromHwvirtMsrs(&g_HmMsrs, &pVM->hm.s.ForR3.vmx.Msrs);
Note:
See TracChangeset
for help on using the changeset viewer.