We figured NMI relates to machines (for their machine-specific handling), so move the 'inject-nmi' QMP handler with the rest of machine ones, in hw/core/machine-qmp-cmds.c.
Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Marc-André Lureau <[email protected]> Message-Id: <[email protected]> --- hw/core/machine-qmp-cmds.c | 6 ++++++ system/cpus.c | 8 -------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c index e62cb4ec888..1aa5f262298 100644 --- a/hw/core/machine-qmp-cmds.c +++ b/hw/core/machine-qmp-cmds.c @@ -10,6 +10,7 @@ #include "qemu/osdep.h" #include "hw/acpi/vmgenid.h" #include "hw/core/boards.h" +#include "hw/core/nmi.h" #include "hw/intc/intc.h" #include "hw/mem/memory-device.h" #include "qapi/error.h" @@ -448,3 +449,8 @@ void qmp_dump_skeys(const char *filename, Error **errp) } DUMP_SKEYS_INTERFACE_CLASS(oc)->qmp_dump_skeys(filename, errp); } + +void qmp_inject_nmi(Error **errp) +{ + nmi_inject(errp); +} diff --git a/system/cpus.c b/system/cpus.c index 9758cda4636..aa2510bf8fc 100644 --- a/system/cpus.c +++ b/system/cpus.c @@ -26,7 +26,6 @@ #include "qemu/coroutine-tls.h" #include "qapi/error.h" #include "qapi/qapi-commands-machine.h" -#include "qapi/qapi-commands-misc.h" #include "qapi/qapi-events-run-state.h" #include "qapi/qmp/qerror.h" #include "exec/gdbstub.h" @@ -38,7 +37,6 @@ #include "qemu/plugin.h" #include "system/cpus.h" #include "qemu/guest-random.h" -#include "hw/core/nmi.h" #include "system/physmem.h" #include "system/replay.h" #include "system/runstate.h" @@ -922,9 +920,3 @@ void qmp_pmemsave(uint64_t addr, uint64_t size, const char *filename, exit: fclose(f); } - -void qmp_inject_nmi(Error **errp) -{ - nmi_inject(errp); -} - -- 2.53.0
