Changeset 78889 in vbox for trunk/src/VBox/VMM
- Timestamp:
- May 31, 2019 9:00:08 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 131007
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h
r78886 r78889 2737 2737 Assert(!VMX_ENTRY_INT_INFO_IS_VALID(pVmcs->u32EntryIntInfo)); 2738 2738 2739 /* Update the VM-exit reason, the other relevant data fields are expected to be updated by the caller already. */ 2739 /* 2740 * Update the VM-exit reason. Other VMCS data fields are expected to be updated by the caller already. 2741 */ 2740 2742 pVmcs->u32RoExitReason = uExitReason; 2741 2743 Log3(("vmexit: uExitReason=%#RX32 uExitQual=%#RX64 cs:rip=%04x:%#RX64\n", uExitReason, pVmcs->u64RoExitQual, … … 2743 2745 2744 2746 /* 2745 * Clear IDT-vectoring information fields if the VM-exit was nottriggered during delivery of an event.2747 * Update the IDT-vectoring information fields if the VM-exit is triggered during delivery of an event. 2746 2748 * See Intel spec. 27.2.3 "Information for VM Exits During Event Delivery". 2747 2749 */ … … 2751 2753 uint32_t uErrCode; 2752 2754 bool const fInEventDelivery = IEMGetCurrentXcpt(pVCpu, &uVector, &fFlags, &uErrCode, NULL /* uCr2 */); 2753 if (!fInEventDelivery) 2754 { 2755 iemVmxVmcsSetIdtVectoringInfo(pVCpu, 0); 2756 iemVmxVmcsSetIdtVectoringErrCode(pVCpu, 0); /* Not strictly needed but do it for consistency. */ 2757 } 2758 /* else: Caller would have updated IDT-vectoring information already, see iemVmxVmexitEvent(). */ 2755 if (fInEventDelivery) 2756 { 2757 uint8_t const uIdtVectoringType = iemVmxGetEventType(uVector, fFlags); 2758 uint8_t const fErrCodeValid = RT_BOOL(fFlags & IEM_XCPT_FLAGS_ERR); 2759 uint32_t const uIdtVectoringInfo = RT_BF_MAKE(VMX_BF_IDT_VECTORING_INFO_VECTOR, uVector) 2760 | RT_BF_MAKE(VMX_BF_IDT_VECTORING_INFO_TYPE, uIdtVectoringType) 2761 | RT_BF_MAKE(VMX_BF_IDT_VECTORING_INFO_ERR_CODE_VALID, fErrCodeValid) 2762 | RT_BF_MAKE(VMX_BF_IDT_VECTORING_INFO_VALID, 1); 2763 iemVmxVmcsSetIdtVectoringInfo(pVCpu, uIdtVectoringInfo); 2764 iemVmxVmcsSetIdtVectoringErrCode(pVCpu, uErrCode); 2765 } 2759 2766 } 2760 2767 … … 3941 3948 if (!pVCpu->cpum.GstCtx.hwvirt.vmx.fInterceptEvents) 3942 3949 { 3943 /* Update the IDT-vectoring event in the VMCS as the source of the upcoming event. */3944 uint8_t const uIdtVectoringType = iemVmxGetEventType(uVector, fFlags);3945 bool const fErrCodeValid = RT_BOOL(fFlags & IEM_XCPT_FLAGS_ERR);3946 uint32_t const uIdtVectoringInfo = RT_BF_MAKE(VMX_BF_IDT_VECTORING_INFO_VECTOR, uVector)3947 | RT_BF_MAKE(VMX_BF_IDT_VECTORING_INFO_TYPE, uIdtVectoringType)3948 | RT_BF_MAKE(VMX_BF_IDT_VECTORING_INFO_ERR_CODE_VALID, fErrCodeValid)3949 | RT_BF_MAKE(VMX_BF_IDT_VECTORING_INFO_VALID, 1);3950 iemVmxVmcsSetIdtVectoringInfo(pVCpu, uIdtVectoringInfo);3951 iemVmxVmcsSetIdtVectoringErrCode(pVCpu, uErrCode);3952 3953 3950 /* 3954 3951 * If the event is a virtual-NMI (which is an NMI being inject during VM-entry)
Note:
See TracChangeset
for help on using the changeset viewer.