Changeset 76800 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Jan 14, 2019 6:33:43 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 128138
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h
r76743 r76800 2462 2462 return iemVmxAbort(pVCpu, VMXABORT_LOAD_HOST_MSR); 2463 2463 } 2464 2465 return rcStrict; 2464 return VINF_SUCCESS; 2466 2465 } 2467 2466 … … 2837 2836 2838 2837 pVmcs->u32RoExitReason = uExitReason; 2839 2840 /** @todo NSTVMX: IEMGetCurrentXcpt will be VM-exit interruption info. */ 2841 /** @todo NSTVMX: The source event should be recorded in IDT-vectoring info 2842 * during injection. */ 2838 Log3(("vmexit: uExitReason=%#RX32 uExitQual=%#RX64\n", uExitReason, pVmcs->u64RoExitQual)); 2843 2839 2844 2840 /* … … 2874 2870 } 2875 2871 2872 /* Restore the host (outer guest) state. */ 2876 2873 VBOXSTRICTRC rcStrict = iemVmxVmexitLoadHostState(pVCpu, uExitReason); 2877 if (RT_FAILURE(rcStrict)) 2878 LogFunc(("Loading host-state failed. uExitReason=%u rc=%Rrc\n", uExitReason, VBOXSTRICTRC_VAL(rcStrict))); 2874 if (RT_SUCCESS(rcStrict)) 2875 { 2876 Assert(rcStrict == VINF_SUCCESS); 2877 rcStrict = VINF_VMX_VMEXIT; 2878 } 2879 else 2880 Log3(("vmexit: Loading host-state failed. uExitReason=%u rc=%Rrc\n", uExitReason, VBOXSTRICTRC_VAL(rcStrict))); 2879 2881 2880 2882 /* We're no longer in nested-guest execution mode. */ 2881 2883 pVCpu->cpum.GstCtx.hwvirt.vmx.fInVmxNonRootMode = false; 2882 2884 2883 Assert(rcStrict == VINF_SUCCESS);2885 /* Revert any IEM-only nested-guest execution policy if any. */ 2884 2886 IEM_VMX_R3_EXECPOLICY_IEM_ALL_DISABLE(pVCpu, "VM-exit"); 2885 return VINF_VMX_VMEXIT;2887 return rcStrict; 2886 2888 # endif 2887 2889 } … … 4026 4028 { 4027 4029 if (uVector == X86_XCPT_PF) 4030 { 4031 Assert(fFlags & IEM_XCPT_FLAGS_CR2); 4028 4032 uExitQual = uCr2; 4033 } 4029 4034 else if (uVector == X86_XCPT_DB) 4030 4035 { … … 7087 7092 /* 7088 7093 * Inject events. 7094 * The event that is going to be made pending for injection is not subject to VMX intercepts, 7095 * thus we flag ignoring of intercepts. However, recursive exceptions if any during delivery 7096 * of the current event -are- subject to intercepts, hence this flag will be flipped during 7097 * the actually delivery of this event. 7098 * 7089 7099 * See Intel spec. 26.5 "Event Injection". 7090 7100 */ 7091 7101 PCVMXVVMCS pVmcs = pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pVmcs); 7092 uint32_t const uEntryIntInfo = pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pVmcs)->u32EntryIntInfo; 7093 if (VMX_ENTRY_INT_INFO_IS_VALID(uEntryIntInfo)) 7094 { 7095 /* 7096 * The event that is going to be made pending for injection is not subject to VMX intercepts, 7097 * thus we flag ignoring of intercepts. However, recursive exceptions if any during delivery 7098 * of the current event -are- subject to intercepts, hence this flag will be flipped during 7099 * the actually delivery of this event. 7100 */ 7101 pVCpu->cpum.GstCtx.hwvirt.vmx.fInterceptEvents = false; 7102 7102 uint32_t const uEntryIntInfo = pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pVmcs)->u32EntryIntInfo; 7103 bool const fEntryIntInfoValid = VMX_ENTRY_INT_INFO_IS_VALID(uEntryIntInfo); 7104 7105 pVCpu->cpum.GstCtx.hwvirt.vmx.fInterceptEvents = !fEntryIntInfoValid; 7106 if (fEntryIntInfoValid) 7107 { 7103 7108 uint8_t const uType = VMX_ENTRY_INT_INFO_TYPE(uEntryIntInfo); 7104 7109 if (uType == VMX_ENTRY_INT_INFO_TYPE_OTHER_EVENT) … … 7121 7126 if (fPendingDbgXcpt) 7122 7127 { 7123 pVCpu->cpum.GstCtx.hwvirt.vmx.fInterceptEvents = true;7124 7128 uint32_t const uDbgXcptInfo = RT_BF_MAKE(VMX_BF_ENTRY_INT_INFO_VECTOR, X86_XCPT_DB) 7125 7129 | RT_BF_MAKE(VMX_BF_ENTRY_INT_INFO_TYPE, VMX_ENTRY_INT_INFO_TYPE_HW_XCPT)
Note:
See TracChangeset
for help on using the changeset viewer.