Changeset 74171 in vbox for trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h
- Timestamp:
- Sep 10, 2018 7:48:40 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h
r74167 r74171 2917 2917 * Activity state. 2918 2918 */ 2919 if (!(pVmcs->u32GuestActivityState & VMX_V_GUEST_ACTIVITY_STATE_MASK)) 2919 uint64_t const u64GuestVmxMiscMsr = CPUMGetGuestIa32VmxMisc(pVCpu); 2920 uint32_t const fActivityStateMask = RT_BF_GET(u64GuestVmxMiscMsr, VMX_BF_MISC_ACTIVITY_STATES); 2921 if (!(pVmcs->u32GuestActivityState & fActivityStateMask)) 2920 2922 { /* likely */ } 2921 2923 else … … 2923 2925 2924 2926 X86DESCATTR SsAttr; SsAttr.u = pVmcs->u32GuestSsAttr; 2925 if (SsAttr.n.u2Dpl != 0) 2926 { 2927 if (pVmcs->u32GuestActivityState != VMX_VMCS_GUEST_ACTIVITY_HLT) 2928 { /* likely */ } 2929 else 2930 IEM_VMX_VMENTRY_FAILED_RET(pVCpu, pszInstr, pszFailure, kVmxVDiag_Vmentry_GuestActStateSsDpl); 2931 } 2927 2928 if ( !SsAttr.n.u2Dpl 2929 || pVmcs->u32GuestActivityState != VMX_VMCS_GUEST_ACTIVITY_HLT) 2930 { /* likely */ } 2931 else 2932 IEM_VMX_VMENTRY_FAILED_RET(pVCpu, pszInstr, pszFailure, kVmxVDiag_Vmentry_GuestActStateSsDpl); 2932 2933 2933 2934 if ( pVmcs->u32GuestIntrState == VMX_VMCS_GUEST_INT_STATE_BLOCK_STI … … 2944 2945 uint8_t const uIntType = VMX_ENTRY_INT_INFO_TYPE(pVmcs->u32EntryIntInfo); 2945 2946 uint8_t const uVector = VMX_ENTRY_INT_INFO_VECTOR(pVmcs->u32EntryIntInfo); 2947 AssertCompile(VMX_V_GUEST_ACTIVITY_STATE_MASK == (VMX_VMCS_GUEST_ACTIVITY_HLT | VMX_VMCS_GUEST_ACTIVITY_SHUTDOWN)); 2946 2948 switch (pVmcs->u32GuestActivityState) 2947 2949 { … … 2981 2983 * Interruptibility state. 2982 2984 */ 2983 /** @todo NSTVMX: interruptibility-state. */ 2985 if (!(pVmcs->u32GuestIntrState & ~VMX_VMCS_GUEST_INT_STATE_MASK)) 2986 { /* likely */ } 2987 else 2988 IEM_VMX_VMENTRY_FAILED_RET(pVCpu, pszInstr, pszFailure, kVmxVDiag_Vmentry_GuestIntStateRsvd); 2989 2990 if ((pVmcs->u32GuestIntrState & (VMX_VMCS_GUEST_INT_STATE_BLOCK_MOVSS | VMX_VMCS_GUEST_INT_STATE_BLOCK_STI)) 2991 != (VMX_VMCS_GUEST_INT_STATE_BLOCK_MOVSS | VMX_VMCS_GUEST_INT_STATE_BLOCK_STI)) 2992 { /* likely */ } 2993 else 2994 IEM_VMX_VMENTRY_FAILED_RET(pVCpu, pszInstr, pszFailure, kVmxVDiag_Vmentry_GuestIntStateStiMovSs); 2995 2996 if ( (pVmcs->u64GuestRFlags.u & X86_EFL_IF) 2997 || !(pVmcs->u32GuestIntrState & VMX_VMCS_GUEST_INT_STATE_BLOCK_STI)) 2998 { /* likely */ } 2999 else 3000 IEM_VMX_VMENTRY_FAILED_RET(pVCpu, pszInstr, pszFailure, kVmxVDiag_Vmentry_GuestIntStateRFlagsSti); 3001 3002 if (VMX_ENTRY_INT_INFO_IS_VALID(pVmcs->u32EntryIntInfo)) 3003 { 3004 uint8_t const uIntType = VMX_ENTRY_INT_INFO_TYPE(pVmcs->u32EntryIntInfo); 3005 if (uIntType == VMX_ENTRY_INT_INFO_TYPE_EXT_INT) 3006 { 3007 if (!(pVmcs->u32GuestIntrState & (VMX_VMCS_GUEST_INT_STATE_BLOCK_MOVSS | VMX_VMCS_GUEST_INT_STATE_BLOCK_STI))) 3008 { /* likely */ } 3009 else 3010 IEM_VMX_VMENTRY_FAILED_RET(pVCpu, pszInstr, pszFailure, kVmxVDiag_Vmentry_GuestIntStateExtInt); 3011 } 3012 else if (uIntType == VMX_ENTRY_INT_INFO_TYPE_NMI) 3013 { 3014 if (!(pVmcs->u32GuestIntrState & (VMX_VMCS_GUEST_INT_STATE_BLOCK_MOVSS | VMX_VMCS_GUEST_INT_STATE_BLOCK_STI))) 3015 { /* likely */ } 3016 else 3017 IEM_VMX_VMENTRY_FAILED_RET(pVCpu, pszInstr, pszFailure, kVmxVDiag_Vmentry_GuestIntStateNmi); 3018 3019 if ( !(pVmcs->u32PinCtls & VMX_PIN_CTLS_VIRT_NMI) 3020 || !(pVmcs->u32GuestIntrState & VMX_VMCS_GUEST_INT_STATE_BLOCK_NMI)) 3021 { /* likely */ } 3022 else 3023 IEM_VMX_VMENTRY_FAILED_RET(pVCpu, pszInstr, pszFailure, kVmxVDiag_Vmentry_GuestIntStateVirtNmi); 3024 } 3025 } 3026 3027 /* We don't support SMM yet. So blocking-by-SMIs must not be set. */ 3028 if (!(pVmcs->u32GuestIntrState & VMX_VMCS_GUEST_INT_STATE_BLOCK_SMI)) 3029 { /* likely */ } 3030 else 3031 IEM_VMX_VMENTRY_FAILED_RET(pVCpu, pszInstr, pszFailure, kVmxVDiag_Vmentry_GuestIntStateSmi); 3032 3033 /* We don't support SGX yet. So enclave-interruption must not be set. */ 3034 if (!(pVmcs->u32GuestIntrState & VMX_VMCS_GUEST_INT_STATE_ENCLAVE)) 3035 { /* likely */ } 3036 else 3037 IEM_VMX_VMENTRY_FAILED_RET(pVCpu, pszInstr, pszFailure, kVmxVDiag_Vmentry_GuestIntStateEnclave); 3038 3039 /** @todo NSTVMX: Pending debug exceptions, VMCS link pointer. */ 2984 3040 2985 3041 NOREF(pszInstr); … … 3480 3536 /* TPR threshold without virtual-interrupt delivery. */ 3481 3537 if ( !(pVmcs->u32ProcCtls2 & VMX_PROC_CTLS2_VIRT_INT_DELIVERY) 3482 && (pVmcs->u32TprThreshold & VMX_TPR_THRESHOLD_MASK))3483 IEM_VMX_VMENTRY_FAILED_RET(pVCpu, pszInstr, pszFailure, kVmxVDiag_Vmentry_TprThreshold );3538 && (pVmcs->u32TprThreshold & ~VMX_TPR_THRESHOLD_MASK)) 3539 IEM_VMX_VMENTRY_FAILED_RET(pVCpu, pszInstr, pszFailure, kVmxVDiag_Vmentry_TprThresholdRsvd); 3484 3540 3485 3541 /* TPR threshold and VTPR. */
Note:
See TracChangeset
for help on using the changeset viewer.