[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 23/24] nmi: remove x86 specific nmi handling
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 23/24] nmi: remove x86 specific nmi handling |
Date: |
Mon, 23 May 2016 17:09:58 +0200 |
From: Bandan Das <address@hidden>
nmi_monitor_handle is wired to call the x86 nmi
handler. So, we can directly use it at call sites.
Signed-off-by: Bandan Das <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/core/nmi.c | 24 ------------------------
hw/watchdog/watchdog.c | 2 +-
include/hw/nmi.h | 1 -
3 files changed, 1 insertion(+), 26 deletions(-)
diff --git a/hw/core/nmi.c b/hw/core/nmi.c
index f616a79..bfd0896 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;
@@ -78,25 +73,6 @@ 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 = {
.name = TYPE_NMI,
.parent = TYPE_INTERFACE,
diff --git a/hw/watchdog/watchdog.c b/hw/watchdog/watchdog.c
index bbf3646..2aeaf1f 100644
--- a/hw/watchdog/watchdog.c
+++ b/hw/watchdog/watchdog.c
@@ -143,7 +143,7 @@ void watchdog_perform_action(void)
case WDT_NMI:
qapi_event_send_watchdog(WATCHDOG_EXPIRATION_ACTION_INJECT_NMI,
&error_abort);
- inject_nmi();
+ nmi_monitor_handle(0, NULL);
break;
}
}
diff --git a/include/hw/nmi.h b/include/hw/nmi.h
index f4cec62..b541772 100644
--- a/include/hw/nmi.h
+++ b/include/hw/nmi.h
@@ -45,6 +45,5 @@ typedef struct NMIClass {
} NMIClass;
void nmi_monitor_handle(int cpu_index, Error **errp);
-void inject_nmi(void);
#endif /* NMI_H */
--
1.8.3.1
- [Qemu-devel] [PULL 08/24] vl: change runstate only if new state is different from current state, (continued)
- [Qemu-devel] [PULL 08/24] vl: change runstate only if new state is different from current state, Paolo Bonzini, 2016/05/23
- [Qemu-devel] [PULL 13/24] memory: remove unnecessary masking of MemoryRegion ram_addr, Paolo Bonzini, 2016/05/23
- [Qemu-devel] [PULL 07/24] ioapic: clear remote irr bit for edge-triggered interrupts, Paolo Bonzini, 2016/05/23
- [Qemu-devel] [PULL 01/24] exec.c: Ensure right alignment also for file backed ram, Paolo Bonzini, 2016/05/23
- [Qemu-devel] [PULL 02/24] docs/atomics.txt: Update pointer to linux macro, Paolo Bonzini, 2016/05/23
- [Qemu-devel] [PULL 10/24] exec: adjust rcu_read_lock requirement, Paolo Bonzini, 2016/05/23
- [Qemu-devel] [PULL 18/24] esp: check command buffer length before write(CVE-2016-4439), Paolo Bonzini, 2016/05/23
- [Qemu-devel] [PULL 04/24] configure: Allow builds with extra warnings, Paolo Bonzini, 2016/05/23
- [Qemu-devel] [PULL 15/24] Remove config-devices.mak on 'make clean', Paolo Bonzini, 2016/05/23
- [Qemu-devel] [PULL 14/24] cpus.c: Use pthread_sigmask() rather than sigprocmask(), Paolo Bonzini, 2016/05/23
- [Qemu-devel] [PULL 23/24] nmi: remove x86 specific nmi handling,
Paolo Bonzini <=
- [Qemu-devel] [PULL 19/24] esp: check dma length before reading scsi command(CVE-2016-4441), Paolo Bonzini, 2016/05/23
- [Qemu-devel] [PULL 12/24] memory: Drop FlatRange.romd_mode, Paolo Bonzini, 2016/05/23
- [Qemu-devel] [PULL 17/24] scripts/signrom.py: Check for magic in option ROMs., Paolo Bonzini, 2016/05/23
- [Qemu-devel] [PULL 11/24] memory: Remove code for mr->may_overlap, Paolo Bonzini, 2016/05/23
- [Qemu-devel] [PULL 16/24] scripts/signrom.py: Allow option ROM checksum script to write the size header., Paolo Bonzini, 2016/05/23
- [Qemu-devel] [PULL 24/24] cpus: call the core nmi injection function, Paolo Bonzini, 2016/05/23
- [Qemu-devel] [PULL 20/24] iscsi: pass SCSI status back for SG_IO, Paolo Bonzini, 2016/05/23
- [Qemu-devel] [PULL 22/24] target-i386: add a generic x86 nmi handler, Paolo Bonzini, 2016/05/23
- [Qemu-devel] [PULL 21/24] coccinelle: add g_assert_cmp* to macro file, Paolo Bonzini, 2016/05/23
- Re: [Qemu-devel] [PULL 00/24] Misc patches for 2016-05-23, Peter Maydell, 2016/05/23