Changeset 77712 in vbox
- Timestamp:
- Mar 15, 2019 6:44:10 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/cpum.h
r77522 r77712 2107 2107 return pCtx->hwvirt.vmx.CTX_SUFF(pVmcs)->u64AddrApicAccess.u; 2108 2108 } 2109 2110 2109 # endif /* !IN_RC */ 2111 2110 … … 2267 2266 } CPUMINTERRUPTIBILITY; 2268 2267 2269 /**2270 * Calculates the interruptiblity of the guest.2271 *2272 * @returns Interruptibility level.2273 * @param pVCpu The cross context virtual CPU structure.2274 */2275 2268 VMM_INT_DECL(CPUMINTERRUPTIBILITY) CPUMGetGuestInterruptibility(PVMCPU pVCpu); 2269 VMM_INT_DECL(bool) CPUMIsGuestNmiBlocking(PVMCPU pVCpu); 2276 2270 2277 2271 -
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r77149 r77712 2778 2778 2779 2779 /** 2780 * Gets whether the guest (or nested-guest) is currently blocking delivery of NMIs. 2781 * 2782 * @returns @c true if NMIs are blocked, @c false otherwise. 2783 * @param pVCpu The cross context virtual CPU structure. 2784 */ 2785 VMM_INT_DECL(bool) CPUMIsGuestNmiBlocking(PVMCPU pVCpu) 2786 { 2787 #ifndef IN_RC 2788 /* 2789 * Return the state of guest-NMI blocking in any of the following cases: 2790 * - We're not executing a nested-guest. 2791 * - We're executing an SVM nested-guest[1]. 2792 * - We're executing a VMX nested-guest without virtual-NMIs enabled. 2793 * 2794 * [1] -- SVM does not support virtual-NMIs or virtual-NMI blocking. 2795 * SVM hypervisors must track NMI blocking themselves by intercepting 2796 * the IRET instruction after injection of an NMI. 2797 */ 2798 PCCPUMCTX pCtx = &pVCpu->cpum.s.Guest; 2799 if ( !CPUMIsGuestInNestedHwvirtMode(pCtx) 2800 || CPUMIsGuestInSvmNestedHwVirtMode(pCtx) 2801 || !CPUMIsGuestVmxPinCtlsSet(pVCpu, pCtx, VMX_PIN_CTLS_VIRT_NMI)) 2802 return VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_BLOCK_NMIS); 2803 2804 /* 2805 * Return the state of virtual-NMI blocking, if we are executing a 2806 * VMX nested-guest with virtual-NMIs enabled. 2807 */ 2808 Assert(CPUMIsGuestVmxPinCtlsSet(pVCpu, pCtx, VMX_PIN_CTLS_VIRT_NMI)); 2809 return pCtx->hwvirt.vmx.fVirtNmiBlocking; 2810 #else 2811 return VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_BLOCK_NMIS); 2812 #endif 2813 } 2814 2815 2816 /** 2780 2817 * Checks whether the VMX nested-guest is in a state to receive physical (APIC) 2781 2818 * interrupts.
Note:
See TracChangeset
for help on using the changeset viewer.