Changeset 77410 in vbox
- Timestamp:
- Feb 21, 2019 3:37:11 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 128970
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h ¶
r77408 r77410 2832 2832 2833 2833 /* 2834 * If we support storing EFER.LMA into IA32e-mode guest field on VM-exit, we need to do that now.2835 * See Intel spec. 27.2 "Recording VM-exit Information And Updating VM-entry Control".2836 */2837 if (IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fVmxExitSaveEferLma)2838 {2839 if (pVCpu->cpum.GstCtx.msrEFER & MSR_K6_EFER_LMA)2840 pVmcs->u32EntryCtls |= VMX_ENTRY_CTLS_IA32E_MODE_GUEST;2841 else2842 pVmcs->u32EntryCtls &= ~VMX_ENTRY_CTLS_IA32E_MODE_GUEST;2843 }2844 2845 /*2846 2834 * Save the guest state back into the VMCS. 2847 2835 * We only need to save the state when the VM-entry was successful. … … 2850 2838 if (!fVmentryFailed) 2851 2839 { 2840 /* 2841 * If we support storing EFER.LMA into IA32e-mode guest field on VM-exit, we need to do that now. 2842 * See Intel spec. 27.2 "Recording VM-exit Information And Updating VM-entry Control". 2843 * 2844 * It is not clear from the Intel spec. if this is done only when VM-entry succeeds. 2845 * If a VM-exit happens before loading guest EFER, we risk restoring the host EFER.LMA 2846 * as guest-CPU state would not been modified. Hence for now, we do this only when 2847 * the VM-entry succeeded. 2848 */ 2849 /** @todo r=ramshankar: Figure out if this bit gets set to host EFER.LMA on real 2850 * hardware when VM-exit fails during VM-entry (e.g. VERR_VMX_INVALID_GUEST_STATE). */ 2851 if (IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fVmxExitSaveEferLma) 2852 { 2853 if (pVCpu->cpum.GstCtx.msrEFER & MSR_K6_EFER_LMA) 2854 pVmcs->u32EntryCtls |= VMX_ENTRY_CTLS_IA32E_MODE_GUEST; 2855 else 2856 pVmcs->u32EntryCtls &= ~VMX_ENTRY_CTLS_IA32E_MODE_GUEST; 2857 } 2858 2852 2859 /* 2853 2860 * The rest of the high bits of the VM-exit reason are only relevant when the VM-exit
Note:
See TracChangeset
for help on using the changeset viewer.