aboutsummaryrefslogtreecommitdiff
path: root/cpus.c
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2011-11-23 12:55:53 -0200
committerLuiz Capitulino <lcapitulino@redhat.com>2011-12-06 11:40:01 -0200
commitab49ab5c488237f3656689c4a3cab29e29884ca6 (patch)
tree36dd484fc159f7f54d3c7796b3b0ca28beaf04ad /cpus.c
parente42e818bf45f2f70cdd88a3864efcc3964039f37 (diff)
qapi: Convert inject-nmi
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'cpus.c')
-rw-r--r--cpus.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/cpus.c b/cpus.c
index e916137dbf..7b9f8eb1e7 100644
--- a/cpus.c
+++ b/cpus.c
@@ -1213,3 +1213,16 @@ void qmp_pmemsave(int64_t addr, int64_t size, const char *filename,
exit:
fclose(f);
}
+
+void qmp_inject_nmi(Error **errp)
+{
+#if defined(TARGET_I386)
+ CPUState *env;
+
+ for (env = first_cpu; env != NULL; env = env->next_cpu) {
+ cpu_interrupt(env, CPU_INTERRUPT_NMI);
+ }
+#else
+ error_set(errp, QERR_UNSUPPORTED);
+#endif
+}