Changeset 79235 in vbox
- Timestamp:
- Jun 19, 2019 8:42:11 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h
r79233 r79235 864 864 * @param pVCpu The cross context virtual CPU structure. 865 865 */ 866 DECL_FORCE_INLINE(int) iemVmxCommitCurrentVmcsToMemory(PVMCPU pVCpu) 867 { 866 DECL_FORCE_INLINE(int) iemVmxWriteCurrentVmcsToGstMem(PVMCPU pVCpu) 867 { 868 Assert(pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pVmcs)); 868 869 Assert(IEM_VMX_HAS_CURRENT_VMCS(pVCpu)); 869 Assert(pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pVmcs));870 870 int rc = PGMPhysSimpleWriteGCPhys(pVCpu->CTX_SUFF(pVM), IEM_VMX_GET_CURRENT_VMCS(pVCpu), 871 871 pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pVmcs), sizeof(VMXVVMCS)); 872 IEM_VMX_CLEAR_CURRENT_VMCS(pVCpu); 872 return rc; 873 } 874 875 876 /** 877 * Populates the current VMCS contents from guest memory. 878 * 879 * @returns VBox status code. 880 * @param pVCpu The cross context virtual CPU structure. 881 */ 882 DECL_FORCE_INLINE(int) iemVmxReadCurrentVmcsFromGstMem(PVMCPU pVCpu) 883 { 884 Assert(pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pVmcs)); 885 Assert(IEM_VMX_HAS_CURRENT_VMCS(pVCpu)); 886 int rc = PGMPhysSimpleReadGCPhys(pVCpu->CTX_SUFF(pVM), (void *)pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pVmcs), 887 IEM_VMX_GET_CURRENT_VMCS(pVCpu), sizeof(VMXVVMCS)); 873 888 return rc; 874 889 } … … 7993 8008 { 7994 8009 pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pVmcs)->fVmcsState = fVmcsLaunchStateClear; 7995 iemVmx CommitCurrentVmcsToMemory(pVCpu);7996 Assert(!IEM_VMX_HAS_CURRENT_VMCS(pVCpu));8010 iemVmxWriteCurrentVmcsToGstMem(pVCpu); 8011 IEM_VMX_CLEAR_CURRENT_VMCS(pVCpu); 7997 8012 } 7998 8013 else … … 8208 8223 if (IEM_VMX_HAS_CURRENT_VMCS(pVCpu)) 8209 8224 { 8210 iemVmx CommitCurrentVmcsToMemory(pVCpu);8211 Assert(!IEM_VMX_HAS_CURRENT_VMCS(pVCpu));8212 } 8213 8214 /* Finally, cache the new VMCS from guest memory and mark it as the current VMCS. */8215 rc = PGMPhysSimpleReadGCPhys(pVCpu->CTX_SUFF(pVM), (void *)pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pVmcs), GCPhysVmcs,8216 sizeof(VMXVVMCS));8225 iemVmxWriteCurrentVmcsToGstMem(pVCpu); 8226 IEM_VMX_CLEAR_CURRENT_VMCS(pVCpu); 8227 } 8228 8229 /* Set the new VMCS as the current VMCS and read it from guest memory. */ 8230 IEM_VMX_SET_CURRENT_VMCS(pVCpu, GCPhysVmcs); 8231 rc = iemVmxReadCurrentVmcsFromGstMem(pVCpu); 8217 8232 if (RT_SUCCESS(rc)) 8218 8233 { /* likely */ } … … 8223 8238 return rc; 8224 8239 } 8225 IEM_VMX_SET_CURRENT_VMCS(pVCpu, GCPhysVmcs);8226 8240 } 8227 8241
Note:
See TracChangeset
for help on using the changeset viewer.