Changeset 87518 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Feb 1, 2021 9:01:16 PM (4 years ago)
- Location:
- trunk/src/VBox/VMM/VMMR0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
r87515 r87518 990 990 991 991 /* 992 * Validate some parameters.992 * Validate and copy over some parameters. 993 993 */ 994 994 AssertReturn(pVM->hm.s.svm.fSupported, VERR_INCOMPATIBLE_CONFIG); … … 998 998 VERR_INCOMPATIBLE_CONFIG); 999 999 pVM->hmr0.s.fNestedPaging = fNestedPaging; 1000 pVM->hmr0.s.fAllow64BitGuests = pVM->hm.s.fAllow64BitGuestsCfg; 1000 1001 1001 1002 /* -
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r87515 r87518 2504 2504 { 2505 2505 Assert(!(pVCpu->hmr0.s.vmx.fLazyMsrs & VMX_LAZY_MSRS_LOADED_GUEST)); /* Guest MSRs better not be loaded now. */ 2506 if (pVCpu->CTX_SUFF(pVM)->hm .s.fAllow64BitGuests)2506 if (pVCpu->CTX_SUFF(pVM)->hmr0.s.fAllow64BitGuests) 2507 2507 { 2508 2508 pVCpu->hmr0.s.vmx.u64HostMsrLStar = ASMRdMsr(MSR_K8_LSTAR); … … 2526 2526 static bool hmR0VmxIsLazyGuestMsr(PCVMCPUCC pVCpu, uint32_t idMsr) 2527 2527 { 2528 if (pVCpu->CTX_SUFF(pVM)->hm .s.fAllow64BitGuests)2528 if (pVCpu->CTX_SUFF(pVM)->hmr0.s.fAllow64BitGuests) 2529 2529 { 2530 2530 switch (idMsr) … … 2559 2559 2560 2560 Assert(pVCpu->hmr0.s.vmx.fLazyMsrs & VMX_LAZY_MSRS_SAVED_HOST); 2561 if (pVCpu->CTX_SUFF(pVM)->hm .s.fAllow64BitGuests)2561 if (pVCpu->CTX_SUFF(pVM)->hmr0.s.fAllow64BitGuests) 2562 2562 { 2563 2563 /* … … 2615 2615 { 2616 2616 Assert(pVCpu->hmr0.s.vmx.fLazyMsrs & VMX_LAZY_MSRS_SAVED_HOST); 2617 if (pVCpu->CTX_SUFF(pVM)->hm .s.fAllow64BitGuests)2617 if (pVCpu->CTX_SUFF(pVM)->hmr0.s.fAllow64BitGuests) 2618 2618 { 2619 2619 ASMWrMsr(MSR_K8_LSTAR, pVCpu->hmr0.s.vmx.u64HostMsrLStar); … … 3774 3774 * required for 64-bit guests. 3775 3775 */ 3776 if (pVM->hm .s.fAllow64BitGuests)3776 if (pVM->hmr0.s.fAllow64BitGuests) 3777 3777 { 3778 3778 hmR0VmxSetMsrPermission(pVCpu, pVmcsInfo, false, MSR_K8_LSTAR, VMXMSRPM_ALLOW_RD_WR); … … 3990 3990 /* Some 32-bit CPUs do not support CR8 load/store exiting as MOV CR8 is 3991 3991 invalid on 32-bit Intel CPUs. Set this control only for 64-bit guests. */ 3992 if (pVM->hm.s.fAllow64BitGuests) 3993 { 3992 if (pVM->hmr0.s.fAllow64BitGuests) 3994 3993 fVal |= VMX_PROC_CTLS_CR8_STORE_EXIT /* CR8 reads cause a VM-exit. */ 3995 3994 | VMX_PROC_CTLS_CR8_LOAD_EXIT; /* CR8 writes cause a VM-exit. */ 3996 }3997 3995 } 3998 3996 … … 4538 4536 VERR_INCOMPATIBLE_CONFIG); 4539 4537 pVM->hmr0.s.fNestedPaging = fNestedPaging; 4538 pVM->hmr0.s.fAllow64BitGuests = pVM->hm.s.fAllow64BitGuestsCfg; 4540 4539 4541 4540 /* Initialize these always, see hmR3InitFinalizeR0().*/ … … 7754 7753 if (fWhat & CPUMCTX_EXTRN_KERNEL_GS_BASE) 7755 7754 { 7756 if ( pVM->hm .s.fAllow64BitGuests7755 if ( pVM->hmr0.s.fAllow64BitGuests 7757 7756 && (pVCpu->hmr0.s.vmx.fLazyMsrs & VMX_LAZY_MSRS_LOADED_GUEST)) 7758 7757 pCtx->msrKERNELGSBASE = ASMRdMsr(MSR_K8_KERNEL_GS_BASE); … … 7761 7760 if (fWhat & CPUMCTX_EXTRN_SYSCALL_MSRS) 7762 7761 { 7763 if ( pVM->hm .s.fAllow64BitGuests7762 if ( pVM->hmr0.s.fAllow64BitGuests 7764 7763 && (pVCpu->hmr0.s.vmx.fLazyMsrs & VMX_LAZY_MSRS_LOADED_GUEST)) 7765 7764 { … … 10596 10595 * be taken care of by EPT/shadow paging. 10597 10596 */ 10598 if (pVM->hm.s.fAllow64BitGuests) 10599 { 10597 if (pVM->hmr0.s.fAllow64BitGuests) 10600 10598 u32ProcCtls |= VMX_PROC_CTLS_CR8_STORE_EXIT 10601 10599 | VMX_PROC_CTLS_CR8_LOAD_EXIT; 10602 }10603 10600 } 10604 10601
Note:
See TracChangeset
for help on using the changeset viewer.