new file mode 100644
@@ -0,0 +1,24 @@
+# -*- Mode: Python -*-
+# vim: filetype=python
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+##
+# @rtc-reset-reinjection:
+#
+# This command will reset the RTC interrupt reinjection backlog. Can
+# be used if another mechanism to synchronize guest time is in effect,
+# for example QEMU guest agent's guest-set-time command.
+#
+# Use of this command is only applicable for x86 machines with an RTC,
+# and on other machines will silently return without performing any
+# action.
+#
+# Since: 2.1
+#
+# .. qmp-example::
+#
+# -> { "execute": "rtc-reset-reinjection" }
+# <- { "return": {} }
+##
+{ 'command': 'rtc-reset-reinjection' }
@@ -2,23 +2,6 @@
# vim: filetype=python
#
-##
-# @rtc-reset-reinjection:
-#
-# This command will reset the RTC interrupt reinjection backlog. Can
-# be used if another mechanism to synchronize guest time is in effect,
-# for example QEMU guest agent's guest-set-time command.
-#
-# Since: 2.1
-#
-# .. qmp-example::
-#
-# -> { "execute": "rtc-reset-reinjection" }
-# <- { "return": {} }
-##
-{ 'command': 'rtc-reset-reinjection',
- 'if': 'TARGET_I386' }
-
##
# @SevState:
#
@@ -61,6 +61,7 @@
{ 'include': 'replay.json' }
{ 'include': 'yank.json' }
{ 'include': 'misc.json' }
+{ 'include': 'misc-i386.json' }
{ 'include': 'misc-target.json' }
{ 'include': 'audio.json' }
{ 'include': 'acpi.json' }
@@ -26,7 +26,7 @@
#include "monitor/monitor.h"
#include "qobject/qdict.h"
#include "qapi/error.h"
-#include "qapi/qapi-commands-misc-target.h"
+#include "qapi/qapi-commands-misc-i386.h"
#include "hw/i386/x86.h"
#include "hw/rtc/mc146818rtc.h"
new file mode 100644
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include "qemu/osdep.h"
+#include "qapi/error.h"
+#include "qapi/qapi-commands-misc-i386.h"
+
+void qmp_rtc_reset_reinjection(Error **errp)
+{
+ /*
+ * Use of this command is only applicable for x86 machines with an RTC,
+ * and on other machines will silently return without performing any
+ * action.
+ */
+}
@@ -64,6 +64,7 @@ if have_system
'qdev',
'pci',
'rocker',
+ 'misc-i386',
'tpm',
'uefi',
]
@@ -77,6 +77,7 @@ if have_system
stub_ss.add(files('target-monitor-defs.c'))
stub_ss.add(files('win32-kbd-hook.c'))
stub_ss.add(files('xen-hw-stub.c'))
+ stub_ss.add(files('monitor-i386-rtc.c'))
endif
if have_system or have_user