This introduces an NMI (non maskable interrupt) callback per CPU class which QMP's "nmi" command may use to issue NMI on a CPU.
Signed-off-by: Alexey Kardashevskiy <a...@ozlabs.ru> --- hmp-commands.hx | 4 +--- include/qom/cpu.h | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index f3fc514..9633260 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -827,7 +827,6 @@ The values that can be specified here depend on the machine type, but are the same that can be specified in the @code{-boot} command line option. ETEXI -#if defined(TARGET_I386) || defined(TARGET_S390X) { .name = "nmi", .args_type = "", @@ -835,11 +834,10 @@ ETEXI .help = "inject an NMI on all guest's CPUs", .mhandler.cmd = hmp_inject_nmi, }, -#endif STEXI @item nmi @var{cpu} @findex nmi -Inject an NMI (x86) or RESTART (s390x) on the given CPU. +Inject an NMI on the given CPU. ETEXI diff --git a/include/qom/cpu.h b/include/qom/cpu.h index f99885a..8bb7018 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -103,6 +103,7 @@ typedef struct CPUClass { void (*parse_features)(CPUState *cpu, char *str, Error **errp); void (*reset)(CPUState *cpu); + int (*nmi)(CPUState *cs); int reset_dump_flags; bool (*has_work)(CPUState *cpu); void (*do_interrupt)(CPUState *cpu); -- 1.8.4.rc4