Changeset 102987 in vbox
- Timestamp:
- Jan 22, 2024 10:07:42 AM (15 months ago)
- svn:sync-xref-src-repo-rev:
- 161219
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 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); -
trunk/src/VBox/VMM/VMMR3/HM.cpp
r102943 r102987 1638 1638 LogRel(("HM: Using VT-x implementation 3.0\n")); 1639 1639 LogRel(("HM: Max resume loops = %u\n", pVM->hm.s.cMaxResumeLoopsCfg)); 1640 LogRel(("HM: Host CR0 = %#RX64\n", pVM->hm.s.ForR3.vmx.u64HostCr0)); 1640 1641 LogRel(("HM: Host CR4 = %#RX64\n", pVM->hm.s.ForR3.vmx.u64HostCr4)); 1641 1642 LogRel(("HM: Host EFER = %#RX64\n", pVM->hm.s.ForR3.vmx.u64HostMsrEfer)); 1642 LogRel(("HM: MSR_IA32_SMM_MONITOR_CTL = %#RX64\n", pVM->hm.s.ForR3.vmx.u64HostSmmMonitorCtl)); 1643 LogRel(("HM: Host SMM_MONITOR_CTL = %#RX64\n", pVM->hm.s.ForR3.vmx.u64HostSmmMonitorCtl)); 1644 LogRel(("HM: Host CORE_CAPABILITIES = %#RX64\n", pVM->hm.s.ForR3.vmx.u64HostCoreCap)); 1645 LogRel(("HM: Host MEMORY_CTRL = %#RX64%s\n", pVM->hm.s.ForR3.vmx.u64HostMemoryCtrl, 1646 pVM->hm.s.ForR3.vmx.u64HostMemoryCtrl & MSR_MEMORY_CTRL_SPLIT_LOCK_DISABLE ? " - split-lock disable!" : "")); 1643 1647 LogRel(("HM: Host DR6 zero'ed = %#RX64%s\n", pVM->hm.s.ForR3.vmx.u64HostDr6Zeroed, 1644 1648 pVM->hm.s.ForR3.vmx.fAlwaysInterceptMovDRx ? " - always intercept MOV DRx" : "")); -
trunk/src/VBox/VMM/include/HMInternal.h
r100139 r102987 372 372 bool fAlwaysInterceptMovDRx; 373 373 374 /** Host CR0 value (set by ring-0 VMX init, for logging). */ 375 uint64_t u64HostCr0; 374 376 /** Host CR4 value (set by ring-0 VMX init, for logging). */ 375 377 uint64_t u64HostCr4; … … 380 382 /** Host IA32_FEATURE_CONTROL MSR (set by ring-0 VMX init, for logging). */ 381 383 uint64_t u64HostFeatCtrl; 384 /** Host IA32_CORE_CAPABILITIES MSR (set by ring-0 VMX init, for logging). */ 385 uint64_t u64HostCoreCap; 386 /** Host MSR_MEMORY_CTRL MSR (set by ring-0 VMX init, for logging). */ 387 uint64_t u64HostMemoryCtrl; 388 382 389 /** Host zero'ed DR6 value (set by ring-0 VMX init, for logging). */ 383 390 uint64_t u64HostDr6Zeroed; … … 1186 1193 extern uint8_t g_cHmVmxPreemptTimerShift; 1187 1194 extern bool g_fHmVmxSupportsVmcsEfer; 1195 extern uint64_t g_uHmVmxHostCr0; 1188 1196 extern uint64_t g_uHmVmxHostCr4; 1189 1197 extern uint64_t g_uHmVmxHostMsrEfer; 1190 1198 extern uint64_t g_uHmVmxHostSmmMonitorCtl; 1199 extern uint64_t g_uHmVmxHostCoreCap; 1200 extern uint64_t g_uHmVmxHostMemoryCtrl; 1191 1201 extern bool g_fHmSvmSupported; 1192 1202 extern uint32_t g_uHmSvmRev;
Note:
See TracChangeset
for help on using the changeset viewer.