Changeset 79489 in vbox
- Timestamp:
- Jul 3, 2019 8:02:20 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 131753
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r79488 r79489 280 280 * external interrupt or NMI. */ 281 281 bool fVectoringPF; 282 bool afAlignment0[3]; 282 /** Whether the TSC_AUX MSR needs to be removed from the auto-load/store MSR 283 * area after VM-exit. */ 284 bool fRemoveTscAuxMsr; 285 bool afAlignment0[2]; 283 286 284 287 /** The VMCS info. object. */ … … 11747 11750 * host CPU ticks till the next virtual sync deadline (for the dynamic case). 11748 11751 */ 11749 if (pVmcsInfo->u32ProcCtls2 & VMX_PROC_CTLS2_RDTSCP) 11750 { 11751 if (!(pVmcsInfo->u32ProcCtls & VMX_PROC_CTLS_RDTSC_EXIT)) 11752 { 11753 /** @todo NSTVMX: This might be broken wrt to merging MSR permissions when 11754 * transitioning to executing the nested-guest. We should probably remove 11755 * the dynamically added MSRs somehow. */ 11756 hmR0VmxImportGuestState(pVCpu, pVmcsInfo, CPUMCTX_EXTRN_TSC_AUX); 11757 /* NB: Because we call hmR0VmxAddAutoLoadStoreMsr with fUpdateHostMsr=true, 11758 it's safe even after hmR0VmxUpdateAutoLoadHostMsrs has already been done. */ 11759 int rc = hmR0VmxAddAutoLoadStoreMsr(pVCpu, pVmxTransient, MSR_K8_TSC_AUX, CPUMGetGuestTscAux(pVCpu), 11760 true /* fSetReadWrite */, true /* fUpdateHostMsr */); 11761 AssertRC(rc); 11762 } 11763 else 11764 hmR0VmxRemoveAutoLoadStoreMsr(pVCpu, pVmxTransient, MSR_K8_TSC_AUX); 11752 if ( (pVmcsInfo->u32ProcCtls2 & VMX_PROC_CTLS2_RDTSCP) 11753 && !(pVmcsInfo->u32ProcCtls & VMX_PROC_CTLS_RDTSC_EXIT)) 11754 { 11755 /** @todo NSTVMX: This might be broken wrt to merging MSR permissions when 11756 * transitioning to executing the nested-guest. We should probably remove 11757 * the dynamically added MSRs somehow. */ 11758 hmR0VmxImportGuestState(pVCpu, pVmcsInfo, CPUMCTX_EXTRN_TSC_AUX); 11759 11760 /* NB: Because we call hmR0VmxAddAutoLoadStoreMsr with fUpdateHostMsr=true, 11761 it's safe even after hmR0VmxUpdateAutoLoadHostMsrs has already been done. */ 11762 int rc = hmR0VmxAddAutoLoadStoreMsr(pVCpu, pVmxTransient, MSR_K8_TSC_AUX, CPUMGetGuestTscAux(pVCpu), 11763 true /* fSetReadWrite */, true /* fUpdateHostMsr */); 11764 AssertRC(rc); 11765 Assert(!pVmxTransient->fRemoveTscAuxMsr); 11766 pVmxTransient->fRemoveTscAuxMsr = true; 11765 11767 } 11766 11768 … … 11851 11853 pVmxTransient->uExitReason = VMX_EXIT_REASON_BASIC(uExitReason); 11852 11854 pVmxTransient->fVMEntryFailed = VMX_EXIT_REASON_HAS_ENTRY_FAILED(uExitReason); 11855 11856 /* 11857 * Remove the TSC_AUX MSR from the auto-load/store MSR area and reset any MSR 11858 * bitmap permissions, if it was added before VM-entry. 11859 */ 11860 if (pVmxTransient->fRemoveTscAuxMsr) 11861 { 11862 hmR0VmxRemoveAutoLoadStoreMsr(pVCpu, pVmxTransient, MSR_K8_TSC_AUX); 11863 pVmxTransient->fRemoveTscAuxMsr = false; 11864 } 11853 11865 11854 11866 /*
Note:
See TracChangeset
for help on using the changeset viewer.