Changeset 87557 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Feb 3, 2021 11:07:24 AM (4 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMR0.cpp
r87556 r87557 1187 1187 1188 1188 /* Use VMCS shadowing if supported. */ 1189 Assert(!pVM->hm.s.vmx.fUseVmcsShadowing); 1190 if ( pVM->cpum.ro.GuestFeatures.fVmx 1191 && (g_HmMsrs.u.vmx.ProcCtls2.n.allowed1 & VMX_PROC_CTLS2_VMCS_SHADOWING)) 1192 pVM->hm.s.vmx.fUseVmcsShadowing = true; 1189 pVM->hmr0.s.vmx.fUseVmcsShadowing = pVM->cpum.ro.GuestFeatures.fVmx 1190 && (g_HmMsrs.u.vmx.ProcCtls2.n.allowed1 & VMX_PROC_CTLS2_VMCS_SHADOWING); 1191 pVM->hm.s.vmx.fUseVmcsShadowingForRing3 = pVM->hmr0.s.vmx.fUseVmcsShadowing; 1193 1192 1194 1193 /* Use the VMCS controls for swapping the EFER MSR if supported. */ -
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r87556 r87557 1916 1916 1917 1917 bool const fMsrBitmaps = RT_BOOL(g_HmMsrs.u.vmx.ProcCtls.n.allowed1 & VMX_PROC_CTLS_USE_MSR_BITMAPS); 1918 bool const fShadowVmcs = !fIsNstGstVmcs ? pVM->hm .s.vmx.fUseVmcsShadowing : pVM->cpum.ro.GuestFeatures.fVmxVmcsShadowing;1918 bool const fShadowVmcs = !fIsNstGstVmcs ? pVM->hmr0.s.vmx.fUseVmcsShadowing : pVM->cpum.ro.GuestFeatures.fVmxVmcsShadowing; 1919 1919 Assert(!pVM->cpum.ro.GuestFeatures.fVmxVmcsShadowing); /* VMCS shadowing is not yet exposed to the guest. */ 1920 1920 VMXPAGEALLOCINFO aAllocInfo[] = … … 1978 1978 hmR0VmxPagesFree(&pVM->hmr0.s.vmx.hMemObj); 1979 1979 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX 1980 if (pVM->hm .s.vmx.fUseVmcsShadowing)1980 if (pVM->hmr0.s.vmx.fUseVmcsShadowing) 1981 1981 { 1982 1982 RTMemFree(pVM->hmr0.s.vmx.paShadowVmcsFields); … … 2028 2028 */ 2029 2029 bool const fVirtApicAccess = RT_BOOL(g_HmMsrs.u.vmx.ProcCtls2.n.allowed1 & VMX_PROC_CTLS2_VIRT_APIC_ACCESS); 2030 bool const fUseVmcsShadowing = pVM->hm .s.vmx.fUseVmcsShadowing;2030 bool const fUseVmcsShadowing = pVM->hmr0.s.vmx.fUseVmcsShadowing; 2031 2031 VMXPAGEALLOCINFO aAllocInfo[] = 2032 2032 { … … 4050 4050 { 4051 4051 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX 4052 if (pVCpu->CTX_SUFF(pVM)->hm .s.vmx.fUseVmcsShadowing)4052 if (pVCpu->CTX_SUFF(pVM)->hmr0.s.vmx.fUseVmcsShadowing) 4053 4053 { 4054 4054 hmR0VmxSetupVmcsVmreadBitmapAddr(pVCpu); … … 4561 4561 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX 4562 4562 /* Setup the shadow VMCS fields array and VMREAD/VMWRITE bitmaps. */ 4563 if (pVM->hm .s.vmx.fUseVmcsShadowing)4563 if (pVM->hmr0.s.vmx.fUseVmcsShadowing) 4564 4564 { 4565 4565 rc = hmR0VmxSetupShadowVmcsFieldsArrays(pVM); … … 5589 5589 * VMCS shadowing. 5590 5590 */ 5591 if (pVCpu->CTX_SUFF(pVM)->hm .s.vmx.fUseVmcsShadowing)5591 if (pVCpu->CTX_SUFF(pVM)->hmr0.s.vmx.fUseVmcsShadowing) 5592 5592 { 5593 5593 /* -
trunk/src/VBox/VMM/VMMR3/HM.cpp
r87556 r87557 1740 1740 LogRel(("HM: Enabled posted-interrupt processing support\n")); 1741 1741 1742 if (pVM->hm.s.vmx.fUseVmcsShadowing )1742 if (pVM->hm.s.vmx.fUseVmcsShadowingForRing3) 1743 1743 { 1744 1744 bool const fFullVmcsShadow = RT_BOOL(pVM->hm.s.vmx.MsrsForRing3.u64Misc & VMX_MISC_VMWRITE_ALL); -
trunk/src/VBox/VMM/include/HMInternal.h
r87556 r87557 520 520 bool fSupportsVmcsEferForRing3; 521 521 /** Whether to use VMCS shadowing. */ 522 bool fUseVmcsShadowing ;522 bool fUseVmcsShadowingForRing3; 523 523 /** Set if Last Branch Record (LBR) is enabled. */ 524 524 bool fLbr; … … 647 647 /** Set if the preemption timer is in use. */ 648 648 bool fUsePreemptTimer; 649 bool afAlignment1[2]; 649 /** Whether to use VMCS shadowing. */ 650 bool fUseVmcsShadowing; 651 bool afAlignment1[1]; 650 652 /** Set if VPID is supported (copy in HM::vmx::fVpidForRing3). */ 651 653 bool fVpid;
Note:
See TracChangeset
for help on using the changeset viewer.