monitor: Make Xen emulation commands generic ones
In order to build hmp-commands.hx once we need to stop using device target-specific check. Use the generic pattern to make the command available on all targets, providing a stub with kind error message when the feature is not available. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Acked-by: David Woodhouse <dwmw@amazon.co.uk> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20260427080738.77138-10-philmd@linaro.org>
Philippe Mathieu-Daudé committed
Apr 10, 2026 at 13:30 UTC
931506593b7daef76fa35eb6f5f894e2ad43609a
2 files changed
+12
-2
hmp-commands.hx
-2
@@ -1843,7 +1843,6 @@ SRST
1843
ERST
1844
#endif
1845
1846
-#if defined(CONFIG_XEN_EMU)
1846
{
1847
.name = "xen-event-inject",
1848
.args_type = "port:i",
@@ -1870,7 +1869,6 @@ SRST
1869
``xen-event-list``
1870
List event channels in the guest
1871
ERST
1873
-#endif
1872
1873
HXCOMM *** MUST BE LAST ENTRY **
1874
{
hw/i386/kvm/xen-stubs.c
+12
@@ -12,6 +12,8 @@
12
#include "qemu/osdep.h"
13
14
#include "qapi/error.h"
15
+#include "monitor/monitor.h"
16
+#include "monitor/hmp.h"
17
18
#include "xen_evtchn.h"
19
#include "xen_primary_console.h"
@@ -37,3 +39,13 @@ void xen_primary_console_create(void)
39
void xen_primary_console_set_be_port(uint16_t port)
40
{
41
}
42
+
43
+void hmp_xen_event_list(Monitor *mon, const QDict *qdict)
44
+{
45
+ monitor_printf(mon, "XEN emulation is not available in this QEMU\n");
46
+}
47
+
48
+void hmp_xen_event_inject(Monitor *mon, const QDict *qdict)
49
+{
50
+ monitor_printf(mon, "XEN emulation is not available in this QEMU\n");
51
+}