Changeset 74154 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Sep 8, 2018 11:31:22 AM (6 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/HMVMXAll.cpp
r74151 r74154 160 160 VMX_INSTR_DIAG_DESC(kVmxVInstrDiag_Vmentry_GuestEferMsr , "GuestEferMsr" ), 161 161 VMX_INSTR_DIAG_DESC(kVmxVInstrDiag_Vmentry_GuestEferMsrRsvd , "GuestEferMsrRsvd" ), 162 VMX_INSTR_DIAG_DESC(kVmxVInstrDiag_Vmentry_GuestGdtrBase , "GuestGdtrBase" ), 163 VMX_INSTR_DIAG_DESC(kVmxVInstrDiag_Vmentry_GuestGdtrLimit , "GuestGdtrLimit" ), 164 VMX_INSTR_DIAG_DESC(kVmxVInstrDiag_Vmentry_GuestIdtrBase , "GuestIdtrBase" ), 165 VMX_INSTR_DIAG_DESC(kVmxVInstrDiag_Vmentry_GuestIdtrLimit , "GuestIdtrLimit" ), 162 166 VMX_INSTR_DIAG_DESC(kVmxVInstrDiag_Vmentry_GuestPae , "GuestPae" ), 163 167 VMX_INSTR_DIAG_DESC(kVmxVInstrDiag_Vmentry_GuestPatMsr , "GuestPatMsr" ), -
trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h
r74153 r74154 2779 2779 } 2780 2780 2781 2782 /** 2783 * Checks guest GDTR and IDTR as part of VM-entry. 2784 * 2785 * @param pVCpu The cross context virtual CPU structure. 2786 * @param pszInstr The VMX instruction name (for logging purposes). 2787 */ 2788 IEM_STATIC int iemVmxVmentryCheckGuestGdtrIdtr(PVMCPU pVCpu, const char *pszInstr) 2789 { 2790 /* 2791 * GDTR and IDTR. 2792 * See Intel spec. 26.3.1.3 "Checks on Guest Descriptor-Table Registers". 2793 */ 2794 PCVMXVVMCS pVmcs = pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pVmcs); 2795 const char *const pszFailure = "VM-exit"; 2796 if (IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fLongMode) 2797 { 2798 /* Base. */ 2799 if (X86_IS_CANONICAL(pVmcs->u64GuestGdtrBase.u)) 2800 { /* likely */ } 2801 else 2802 IEM_VMX_VMENTRY_FAILED_RET(pVCpu, pszInstr, pszFailure, kVmxVInstrDiag_Vmentry_GuestGdtrBase); 2803 2804 if (X86_IS_CANONICAL(pVmcs->u64GuestIdtrBase.u)) 2805 { /* likely */ } 2806 else 2807 IEM_VMX_VMENTRY_FAILED_RET(pVCpu, pszInstr, pszFailure, kVmxVInstrDiag_Vmentry_GuestIdtrBase); 2808 } 2809 2810 /* Limit. */ 2811 if (!RT_HI_U16(pVmcs->u32GuestGdtrLimit)) 2812 { /* likely */ } 2813 else 2814 IEM_VMX_VMENTRY_FAILED_RET(pVCpu, pszInstr, pszFailure, kVmxVInstrDiag_Vmentry_GuestGdtrLimit); 2815 2816 if (!RT_HI_U16(pVmcs->u32GuestIdtrLimit)) 2817 { /* likely */ } 2818 else 2819 IEM_VMX_VMENTRY_FAILED_RET(pVCpu, pszInstr, pszFailure, kVmxVInstrDiag_Vmentry_GuestIdtrLimit); 2820 2821 NOREF(pszInstr); 2822 NOREF(pszFailure); 2823 return VINF_SUCCESS; 2824 } 2825 2826 2781 2827 /** 2782 2828 * Checks guest-state as part of VM-entry. … … 2799 2845 else 2800 2846 return rc; 2847 2848 rc = iemVmxVmentryCheckGuestGdtrIdtr(pVCpu, pszInstr); 2849 if (rc == VINF_SUCCESS) 2850 { /* likely */ } 2851 else 2852 return rc; 2853 2801 2854 2802 2855 return VINF_SUCCESS;
Note:
See TracChangeset
for help on using the changeset viewer.