FreeBSD/sys/amd64/vmm/intel/vmx.c
/*
 * If the Virtual NMIs execution control is '1' then the logical processor
 * tracks virtual-NMI blocking in the Guest Interruptibility-state field of
 * the VMCS. An IRET instruction in VMX non-root operation will remove any
 * virtual-NMI blocking.
 *
 * This unblocking occurs even if the IRET causes a fault. In this case the
 * hypervisor needs to restore virtual-NMI blocking before resuming the guest.
 */
If the Virtual NMIs execution control is '1' then the logical processor
tracks virtual-NMI blocking in the Guest Interruptibility-state field of
the VMCS. An IRET instruction in VMX non-root operation will remove any
virtual-NMI blocking.

This unblocking occurs even if the IRET causes a fault. In this case the
hypervisor needs to restore virtual-NMI blocking before resuming the guest.
If the Virtual NMIs execution control is ' 1 ' then the logical processor tracks virtual - NMI blocking in the Guest Interruptibility - state field of the VMCS . An IRET instruction in VMX non - root operation will remove any virtual - NMI blocking . This unblocking occurs even if the IRET causes a fault . In this case the hypervisor needs to restore virtual - NMI blocking before resuming the guest .
static void
vmx_restore_nmi_blocking(struct vmx *vmx, int vcpuid)
{
	uint32_t gi;
	VCPU_CTR0(vmx->vm, vcpuid, "Restore Virtual-NMI blocking");
	gi = vmcs_read(VMCS_GUEST_INTERRUPTIBILITY);
	gi |= VMCS_INTERRUPTIBILITY_NMI_BLOCKING;
	vmcs_write(VMCS_GUEST_INTERRUPTIBILITY, gi);
}
static void vmx_restore_nmi_blocking ( struct vmx * vmx , int vcpuid ) { uint32_t gi ; VCPU_CTR0 ( vmx -> vm , vcpuid , " " ) ; gi = vmcs_read ( VMCS_GUEST_INTERRUPTIBILITY ) ; gi |= VMCS_INTERRUPTIBILITY_NMI_BLOCKING ; vmcs_write ( VMCS_GUEST_INTERRUPTIBILITY , gi ) ; }
If the Virtual NMIs execution control is '1' then the logical processor
 tracks virtual-NMI blocking in the Guest Interruptibility-state field of
 the VMCS.
If the Virtual NMIs execution control is ' 1 ' then the logical processor tracks virtual - NMI blocking in the Guest Interruptibility - state field of the VMCS .