Changeset 75199 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Oct 31, 2018 9:03:20 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r75160 r75199 11935 11935 * MSRs required. That would require changes to IEM and possibly CPUM too. 11936 11936 * (Should probably do it lazy fashion from CPUMAllMsrs.cpp). */ 11937 uint32_t const idMsr = pVCpu->cpum.GstCtx.ecx; NOREF(idMsr); /* Save it. */11937 uint32_t const idMsr = pVCpu->cpum.GstCtx.ecx; 11938 11938 int rc = hmR0VmxReadExitInstrLenVmcs(pVmxTransient); 11939 11939 rc |= HMVMX_CPUMCTX_IMPORT_STATE(pVCpu, IEM_CPUMCTX_EXTRN_EXEC_DECODED_NO_MEM_MASK | CPUMCTX_EXTRN_ALL_MSRS); 11940 switch (idMsr) 11941 { 11942 /* The FS and GS base MSRs are not part of the above all MSRs mask. */ 11943 case MSR_K8_FS_BASE: rc |= HMVMX_CPUMCTX_IMPORT_STATE(pVCpu, CPUMCTX_EXTRN_FS); break; 11944 case MSR_K8_GS_BASE: rc |= HMVMX_CPUMCTX_IMPORT_STATE(pVCpu, CPUMCTX_EXTRN_GS); break; 11945 } 11940 11946 AssertRCReturn(rc, rc); 11941 11947 … … 11994 12000 * MSRs required. That would require changes to IEM and possibly CPUM too. 11995 12001 * (Should probably do it lazy fashion from CPUMAllMsrs.cpp). */ 11996 uint32_t const idMsr = pVCpu->cpum.GstCtx.ecx; /* Save it. */12002 uint32_t const idMsr = pVCpu->cpum.GstCtx.ecx; 11997 12003 int rc = hmR0VmxReadExitInstrLenVmcs(pVmxTransient); 11998 12004 rc |= HMVMX_CPUMCTX_IMPORT_STATE(pVCpu, IEM_CPUMCTX_EXTRN_EXEC_DECODED_NO_MEM_MASK 11999 | CPUMCTX_EXTRN_ALL_MSRS | CPUMCTX_EXTRN_FS | CPUMCTX_EXTRN_GS); 12005 | CPUMCTX_EXTRN_ALL_MSRS); 12006 switch (idMsr) 12007 { 12008 /* 12009 * The FS and GS base MSRs are not part of the above all MSRs mask. 12010 * 12011 * Although we don't need to fetch the base as it will be overwritten shortly, while 12012 * loading guest-state we would also load the entire segment register including limit 12013 * and attributes and thus we need to load them here. 12014 */ 12015 case MSR_K8_FS_BASE: rc |= HMVMX_CPUMCTX_IMPORT_STATE(pVCpu, CPUMCTX_EXTRN_FS); break; 12016 case MSR_K8_GS_BASE: rc |= HMVMX_CPUMCTX_IMPORT_STATE(pVCpu, CPUMCTX_EXTRN_GS); break; 12017 } 12000 12018 AssertRCReturn(rc, rc); 12001 12019
Note:
See TracChangeset
for help on using the changeset viewer.