Changeset 77573 in vbox for trunk/src/VBox
- Timestamp:
- Mar 6, 2019 9:25:20 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r77572 r77573 5802 5802 5803 5803 /** 5804 * Sets an external interrupt as pending-for-injection into the VM. 5805 * 5806 * @param pVCpu The cross context virtual CPU structure. 5807 * @param u8Interrupt The external interrupt vector. 5808 */ 5809 DECLINLINE(void) hmR0VmxSetPendingExtInt(PVMCPU pVCpu, uint8_t u8Interrupt) 5810 { 5811 uint32_t const u32IntInfo = RT_BF_MAKE(VMX_BF_EXIT_INT_INFO_VECTOR, u8Interrupt) 5812 | RT_BF_MAKE(VMX_BF_ENTRY_INT_INFO_TYPE, VMX_ENTRY_INT_INFO_TYPE_EXT_INT) 5813 | RT_BF_MAKE(VMX_BF_ENTRY_INT_INFO_ERR_CODE_VALID, 0) 5814 | RT_BF_MAKE(VMX_BF_ENTRY_INT_INFO_VALID, 1); 5815 hmR0VmxSetPendingEvent(pVCpu, u32IntInfo, 0 /* cbInstr */, 0 /* u32ErrCode */, 0 /* GCPtrFaultAddress */); 5816 } 5817 5818 5819 /** 5820 * Sets an NMI (\#NMI) exception as pending-for-injection into the VM. 5821 * 5822 * @param pVCpu The cross context virtual CPU structure. 5823 */ 5824 DECLINLINE(void) hmR0VmxSetPendingXcptNmi(PVMCPU pVCpu) 5825 { 5826 uint32_t const u32IntInfo = RT_BF_MAKE(VMX_BF_ENTRY_INT_INFO_VECTOR, X86_XCPT_NMI) 5827 | RT_BF_MAKE(VMX_BF_ENTRY_INT_INFO_TYPE, VMX_ENTRY_INT_INFO_TYPE_NMI) 5828 | RT_BF_MAKE(VMX_BF_ENTRY_INT_INFO_ERR_CODE_VALID, 0) 5829 | RT_BF_MAKE(VMX_BF_ENTRY_INT_INFO_VALID, 1); 5830 hmR0VmxSetPendingEvent(pVCpu, u32IntInfo, 0 /* cbInstr */, 0 /* u32ErrCode */, 0 /* GCPtrFaultAddress */); 5831 } 5832 5833 5834 /** 5804 5835 * Sets a double-fault (\#DF) exception as pending-for-injection into the VM. 5805 5836 * … … 5812 5843 | RT_BF_MAKE(VMX_BF_ENTRY_INT_INFO_ERR_CODE_VALID, 1) 5813 5844 | RT_BF_MAKE(VMX_BF_ENTRY_INT_INFO_VALID, 1); 5814 hmR0VmxSetPendingEvent(pVCpu, u32IntInfo, 5845 hmR0VmxSetPendingEvent(pVCpu, u32IntInfo, 0 /* cbInstr */, 0 /* u32ErrCode */, 0 /* GCPtrFaultAddress */); 5815 5846 } 5816 5847 … … 7559 7590 && !fBlockMovSS) 7560 7591 { 7592 hmR0VmxSetPendingXcptNmi(pVCpu); 7593 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_INTERRUPT_NMI); 7561 7594 Log4Func(("Pending NMI\n")); 7562 uint32_t u32IntInfo = X86_XCPT_NMI | VMX_EXIT_INT_INFO_VALID;7563 u32IntInfo |= (VMX_EXIT_INT_INFO_TYPE_NMI << VMX_EXIT_INT_INFO_TYPE_SHIFT);7564 7565 hmR0VmxSetPendingEvent(pVCpu, u32IntInfo, 0 /* cbInstr */, 0 /* u32ErrCode */, 0 /* GCPtrFaultAddress */);7566 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_INTERRUPT_NMI);7567 7595 } 7568 7596 else … … 7589 7617 if (RT_SUCCESS(rc)) 7590 7618 { 7591 Log4Func(("Pending external interrupt u8Interrupt=%#x\n", u8Interrupt)); 7592 uint32_t u32IntInfo = u8Interrupt 7593 | VMX_EXIT_INT_INFO_VALID 7594 | (VMX_EXIT_INT_INFO_TYPE_EXT_INT << VMX_EXIT_INT_INFO_TYPE_SHIFT); 7595 7596 hmR0VmxSetPendingEvent(pVCpu, u32IntInfo, 0 /* cbInstr */, 0 /* u32ErrCode */, 0 /* GCPtrfaultAddress */); 7619 hmR0VmxSetPendingExtInt(pVCpu, u8Interrupt); 7620 Log4Func(("Pending external interrupt vector %#x\n", u8Interrupt)); 7597 7621 } 7598 7622 else if (rc == VERR_APIC_INTR_MASKED_BY_TPR)
Note:
See TracChangeset
for help on using the changeset viewer.