Changeset 87559 in vbox
- Timestamp:
- Feb 3, 2021 11:32:52 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 142586
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMR0.cpp
r87557 r87559 1172 1172 if (pVM->hm.s.vmx.fSupported) 1173 1173 { 1174 pVM->hmr0.s.vmx.fUsePreemptTimer = pVM->hm.s.vmx.fUsePreemptTimerCfg && g_fHmVmxUsePreemptTimer;1175 pVM->hm.s.vmx.fUsePreemptTimerCfg = pVM->hmr0.s.vmx.fUsePreemptTimer;1176 pVM->hm.s.vmx.cPreemptTimerShift = g_cHmVmxPreemptTimerShift;1177 pVM->hm.s.vmx.u64HostCr4 = g_uHmVmxHostCr4;1178 pVM->hm.s.vmx.u64HostMsrEfer = g_uHmVmxHostMsrEfer;1179 pVM->hm.s.vmx.u64HostSmmMonitorCtl = g_uHmVmxHostSmmMonitorCtl;1174 pVM->hmr0.s.vmx.fUsePreemptTimer = pVM->hm.s.vmx.fUsePreemptTimerCfg && g_fHmVmxUsePreemptTimer; 1175 pVM->hm.s.vmx.fUsePreemptTimerCfg = pVM->hmr0.s.vmx.fUsePreemptTimer; 1176 pVM->hm.s.vmx.cPreemptTimerShift = g_cHmVmxPreemptTimerShift; 1177 pVM->hm.s.vmx.u64HostCr4ForRing3 = g_uHmVmxHostCr4; 1178 pVM->hm.s.vmx.u64HostMsrEferForRing3 = g_uHmVmxHostMsrEfer; 1179 pVM->hm.s.vmx.u64HostSmmMonitorCtlForRing3 = g_uHmVmxHostSmmMonitorCtl; 1180 1180 HMGetVmxMsrsFromHwvirtMsrs(&g_HmMsrs, &pVM->hm.s.vmx.MsrsForRing3); 1181 1181 /* If you need to tweak host MSRs for testing VMX R0 code, do it here. */ -
trunk/src/VBox/VMM/VMMR3/HM.cpp
r87558 r87559 1506 1506 LogRel(("HM: Using VT-x implementation 3.0\n")); 1507 1507 LogRel(("HM: Max resume loops = %u\n", pVM->hm.s.cMaxResumeLoopsCfg)); 1508 LogRel(("HM: Host CR4 = %#RX64\n", pVM->hm.s.vmx.u64HostCr4 ));1509 LogRel(("HM: Host EFER = %#RX64\n", pVM->hm.s.vmx.u64HostMsrEfer ));1510 LogRel(("HM: MSR_IA32_SMM_MONITOR_CTL = %#RX64\n", pVM->hm.s.vmx.u64HostSmmMonitorCtl ));1508 LogRel(("HM: Host CR4 = %#RX64\n", pVM->hm.s.vmx.u64HostCr4ForRing3)); 1509 LogRel(("HM: Host EFER = %#RX64\n", pVM->hm.s.vmx.u64HostMsrEferForRing3)); 1510 LogRel(("HM: MSR_IA32_SMM_MONITOR_CTL = %#RX64\n", pVM->hm.s.vmx.u64HostSmmMonitorCtlForRing3)); 1511 1511 1512 1512 hmR3VmxReportFeatCtlMsr(pVM->hm.s.vmx.MsrsForRing3.u64FeatCtrl); -
trunk/src/VBox/VMM/include/HMInternal.h
r87558 r87559 491 491 /** Set when we've enabled VMX. */ 492 492 bool fEnabled; 493 /** Set if VPID is supported (ring-3 copy). */ 494 bool fVpidForRing3; 493 /** The shift mask employed by the VMX-Preemption timer (set by ring-0). */ 494 uint8_t cPreemptTimerShift; 495 bool afAlignment1[5]; 496 497 /** Pause-loop exiting (PLE) gap in ticks. */ 498 uint32_t cPleGapTicks; 499 /** Pause-loop exiting (PLE) window in ticks. */ 500 uint32_t cPleWindowTicks; 501 502 /** Virtual address of the TSS page used for real mode emulation. */ 503 R3PTRTYPE(PVBOXTSS) pRealModeTSS; 504 /** Virtual address of the identity page table used for real mode and protected 505 * mode without paging emulation in EPT mode. */ 506 R3PTRTYPE(PX86PD) pNonPagingModeEPTPageTable; 507 508 /** @name Configuration (gets copied if problematic) 509 * @{ */ 510 /** Set if Last Branch Record (LBR) is enabled. */ 511 bool fLbrCfg; 495 512 /** Set if VT-x VPID is allowed. */ 496 513 bool fAllowVpid; … … 501 518 * quietly clears this if the hardware doesn't support the preemption timer. */ 502 519 bool fUsePreemptTimerCfg; 503 /** The shift mask employed by the VMX-Preemption timer (set by ring-0). */ 504 uint8_t cPreemptTimerShift; 505 bool fAlignment1; 506 507 /** Pause-loop exiting (PLE) gap in ticks. */ 508 uint32_t cPleGapTicks; 509 /** Pause-loop exiting (PLE) window in ticks. */ 510 uint32_t cPleWindowTicks; 511 512 /** Host CR4 value (set by ring-0 VMX init, for logging). */ 513 uint64_t u64HostCr4; 514 /** Host SMM monitor control (set by ring-0 VMX init, for logging). */ 515 uint64_t u64HostSmmMonitorCtl; 516 /** Host EFER value (set by ring-0 VMX init, for logging and guest NX). */ 517 uint64_t u64HostMsrEfer; 520 /** @} */ 521 522 /** @name For ring-3 consumption 523 * @{ */ 524 /** Set if VPID is supported (ring-3 copy). */ 525 bool fVpidForRing3; 518 526 /** Whether the CPU supports VMCS fields for swapping EFER (set by ring-0 VMX 519 527 * init, for logging). */ … … 521 529 /** Whether to use VMCS shadowing. */ 522 530 bool fUseVmcsShadowingForRing3; 523 /** Set if Last Branch Record (LBR) is enabled. */ 524 bool fLbrCfg; 525 bool afAlignment2[5]; 531 bool fAlignment2; 532 533 /** Host CR4 value (set by ring-0 VMX init, for logging). */ 534 uint64_t u64HostCr4ForRing3; 535 /** Host SMM monitor control (set by ring-0 VMX init, for logging). */ 536 uint64_t u64HostSmmMonitorCtlForRing3; 537 /** Host EFER value (set by ring-0 VMX init, for logging and guest NX). */ 538 uint64_t u64HostMsrEferForRing3; 526 539 527 540 /** The first valid host LBR branch-from-IP stack range. */ … … 539 552 /** VMX MSR values (only for ring-3 consumption). */ 540 553 VMXMSRS MsrsForRing3; 554 541 555 /** Tagged-TLB flush type (only for ring-3 consumption). */ 542 556 VMXTLBFLUSHTYPE enmTlbFlushTypeForRing3; … … 545 559 /** Flush type to use for INVVPID (only for ring-3 consumption). */ 546 560 VMXTLBFLUSHVPID enmTlbFlushVpidForRing3; 547 uint32_t u32Alignment2; 548 549 /** Virtual address of the TSS page used for real mode emulation. */ 550 R3PTRTYPE(PVBOXTSS) pRealModeTSS; 551 /** Virtual address of the identity page table used for real mode and protected 552 * mode without paging emulation in EPT mode. */ 553 R3PTRTYPE(PX86PD) pNonPagingModeEPTPageTable; 561 /** @} */ 554 562 } vmx; 555 563 … … 569 577 /** Whether to use LBR virtualization feature. */ 570 578 bool fLbrVirt; 571 uint8_t u8Alignment0[2]; 572 573 /** HWCR MSR (for diagnostics). */ 574 uint64_t u64MsrHwcr; 575 579 bool afAlignment1[2]; 580 581 /** Pause filter counter. */ 582 uint16_t cPauseFilter; 583 /** Pause filter treshold in ticks. */ 584 uint16_t cPauseFilterThresholdTicks; 585 uint32_t u32Alignment2; 586 587 /** @name For ring-3 consumption 588 * @{ */ 576 589 /** SVM revision. */ 577 590 uint32_t u32Rev; 578 591 /** SVM feature bits from cpuid 0x8000000a, ring-3 copy. */ 579 592 uint32_t fFeaturesForRing3; 580 581 /** Pause filter counter. */ 582 uint16_t cPauseFilter; 583 /** Pause filter treshold in ticks. */ 584 uint16_t cPauseFilterThresholdTicks; 585 uint32_t u32Alignment0; 593 /** HWCR MSR (for diagnostics). */ 594 uint64_t u64MsrHwcr; 595 /** @} */ 586 596 } svm; 587 597
Note:
See TracChangeset
for help on using the changeset viewer.