[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 1/5] qapi: Restrict 'inject-nmi' command to machine code
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 1/5] qapi: Restrict 'inject-nmi' command to machine code |
Date: |
Mon, 12 Oct 2020 14:15:32 +0200 |
Restricting 'inject-nmi' to machine.json pulls slightly
less QAPI-generated code into user-mode and tools.
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
qapi/machine.json | 20 ++++++++++++++++++++
qapi/misc.json | 20 --------------------
softmmu/cpus.c | 1 +
3 files changed, 21 insertions(+), 20 deletions(-)
diff --git a/qapi/machine.json b/qapi/machine.json
index 756dacb06fd..073b1c98b26 100644
--- a/qapi/machine.json
+++ b/qapi/machine.json
@@ -484,6 +484,26 @@
{ 'enum': 'LostTickPolicy',
'data': ['discard', 'delay', 'slew' ] }
+##
+# @inject-nmi:
+#
+# Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs
(ppc64).
+# The command fails when the guest doesn't support injecting.
+#
+# Returns: If successful, nothing
+#
+# Since: 0.14.0
+#
+# Note: prior to 2.1, this command was only supported for x86 and s390 VMs
+#
+# Example:
+#
+# -> { "execute": "inject-nmi" }
+# <- { "return": {} }
+#
+##
+{ 'command': 'inject-nmi' }
+
##
# @NumaOptionsType:
#
diff --git a/qapi/misc.json b/qapi/misc.json
index 7d1e2e9aaef..3fe9cc21b4b 100644
--- a/qapi/misc.json
+++ b/qapi/misc.json
@@ -341,26 +341,6 @@
##
{ 'command': 'system_wakeup' }
-##
-# @inject-nmi:
-#
-# Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs
(ppc64).
-# The command fails when the guest doesn't support injecting.
-#
-# Returns: If successful, nothing
-#
-# Since: 0.14.0
-#
-# Note: prior to 2.1, this command was only supported for x86 and s390 VMs
-#
-# Example:
-#
-# -> { "execute": "inject-nmi" }
-# <- { "return": {} }
-#
-##
-{ 'command': 'inject-nmi' }
-
##
# @human-monitor-command:
#
diff --git a/softmmu/cpus.c b/softmmu/cpus.c
index 47cceddd805..e46ac68ad09 100644
--- a/softmmu/cpus.c
+++ b/softmmu/cpus.c
@@ -26,6 +26,7 @@
#include "qemu-common.h"
#include "monitor/monitor.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"
--
2.26.2
- [PATCH v2 0/5] qapi: Restrict machine (and migration) specific commands, Philippe Mathieu-Daudé, 2020/10/12
- [PATCH v2 1/5] qapi: Restrict 'inject-nmi' command to machine code,
Philippe Mathieu-Daudé <=
- [PATCH v2 2/5] qapi: Restrict 'system wakeup/reset/powerdown' commands to machine.json, Philippe Mathieu-Daudé, 2020/10/12
- [PATCH v2 3/5] qapi: Restrict '(p)memsave' command to machine code, Philippe Mathieu-Daudé, 2020/10/12
- [PATCH v2 4/5] qapi: Restrict 'query-kvm' command to machine code, Philippe Mathieu-Daudé, 2020/10/12
- [PATCH v2 5/5] qapi: Restrict Xen migration commands to migration.json, Philippe Mathieu-Daudé, 2020/10/12
- Re: [PATCH v2 0/5] qapi: Restrict machine (and migration) specific commands, Eduardo Habkost, 2020/10/15