Index: /trunk/src/VBox/VMM/VMMR3/EM.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/EM.cpp	(revision 75916)
+++ /trunk/src/VBox/VMM/VMMR3/EM.cpp	(revision 75917)
@@ -2111,4 +2111,6 @@
         }
 
+        /* SMIs take priority over if we ever support them will have to be injected here. */
+
 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX
         /*
@@ -2133,4 +2135,31 @@
             if (rc2 != VINF_VMX_INTERCEPT_NOT_ACTIVE)
                 UPDATE_RC();
+        }
+#endif
+
+        /** @todo Enable when I get time to test this specific code path later. */
+#if 0
+        /*
+         * NMIs.
+         * NMIs take priority over external interrupts.
+         */
+        bool fWakeupPending = false;
+        if (    VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_INTERRUPT_NMI)
+            && !VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_BLOCK_NMIS)
+            && !VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_INHIBIT_INTERRUPTS))
+        {
+            rc2 = TRPMAssertTrap(pVCpu, X86_XCPT_NMI, TRPM_TRAP);
+            if (rc2 == VINF_SUCCESS)
+            {
+                fWakeupPending = true;
+                if (pVM->em.s.fIemExecutesAll)
+                    rc2 = VINF_EM_RESCHEDULE;
+                else
+                {
+                    rc2 = HMR3IsActive(pVCpu)    ? VINF_EM_RESCHEDULE_HM
+                        : VM_IS_NEM_ENABLED(pVM) ? VINF_EM_RESCHEDULE
+                        :                          VINF_EM_RESCHEDULE_REM;
+                }
+            }
         }
 #endif
