diff mbox

[2/4] nmi: remove x86 specific nmi handling

Message ID 1463696116-31631-3-git-send-email-bsd@redhat.com
State New
Headers show

Commit Message

Bandan Das May 19, 2016, 10:15 p.m. UTC
nmi_monitor_handle is wired to call the x86 nmi
handler now. So, we can call it here. Note that
this also reverts changes made by commit 33c11879

Signed-off-by: Bandan Das <bsd@redhat.com>
---
 hw/core/nmi.c | 19 -------------------
 1 file changed, 19 deletions(-)
diff mbox

Patch

diff --git a/hw/core/nmi.c b/hw/core/nmi.c
index f616a79..cc47025 100644
--- a/hw/core/nmi.c
+++ b/hw/core/nmi.c
@@ -20,16 +20,11 @@ 
  */
 
 #include "qemu/osdep.h"
-#include "qom/cpu.h"
 #include "hw/nmi.h"
 #include "qapi/error.h"
 #include "qapi/qmp/qerror.h"
 #include "monitor/monitor.h"
 
-#if defined(TARGET_I386)
-#include "cpu.h"
-#endif
-
 struct do_nmi_s {
     int cpu_index;
     Error *err;
@@ -80,21 +75,7 @@  void nmi_monitor_handle(int cpu_index, Error **errp)
 
 void inject_nmi(void)
 {
-#if defined(TARGET_I386)
-    CPUState *cs;
-
-    CPU_FOREACH(cs) {
-        X86CPU *cpu = X86_CPU(cs);
-
-        if (!cpu->apic_state) {
-            cpu_interrupt(cs, CPU_INTERRUPT_NMI);
-        } else {
-            apic_deliver_nmi(cpu->apic_state);
-        }
-    }
-#else
     nmi_monitor_handle(0, NULL);
-#endif
 }
 
 static const TypeInfo nmi_info = {