[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 6/7] hw/xen: Make qmp_xen_set_global_dirty_log() available out
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v3 6/7] hw/xen: Make qmp_xen_set_global_dirty_log() available out of X86 HVM |
Date: |
Mon, 1 Feb 2021 12:29:04 +0100 |
qmp_xen_set_global_dirty_log() is also used by XEN_PV.
This fixes when XEN_PV without XEN_FV:
/usr/bin/ld:
libqemuutil.a(meson-generated_.._qapi_qapi-commands-migration.c.o): in function
`qmp_marshal_xen_set_global_dirty_log':
qapi/qapi-commands-migration.c:626: undefined reference to
`qmp_xen_set_global_dirty_log'
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/i386/xen/xen-hvm.c | 10 ----------
hw/xen/xen-migration.c | 22 ++++++++++++++++++++++
hw/xen/meson.build | 1 +
3 files changed, 23 insertions(+), 10 deletions(-)
create mode 100644 hw/xen/xen-migration.c
diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
index 69196754a30..85859ea0ba3 100644
--- a/hw/i386/xen/xen-hvm.c
+++ b/hw/i386/xen/xen-hvm.c
@@ -24,7 +24,6 @@
#include "hw/xen/xen-bus.h"
#include "hw/xen/xen-x86.h"
#include "qapi/error.h"
-#include "qapi/qapi-commands-migration.h"
#include "qemu/error-report.h"
#include "qemu/main-loop.h"
#include "qemu/range.h"
@@ -1591,12 +1590,3 @@ void xen_hvm_modified_memory(ram_addr_t start,
ram_addr_t length)
}
}
}
-
-void qmp_xen_set_global_dirty_log(bool enable, Error **errp)
-{
- if (enable) {
- memory_global_dirty_log_start();
- } else {
- memory_global_dirty_log_stop();
- }
-}
diff --git a/hw/xen/xen-migration.c b/hw/xen/xen-migration.c
new file mode 100644
index 00000000000..1c53f1af08d
--- /dev/null
+++ b/hw/xen/xen-migration.c
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2010 Citrix Ltd.
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2. See
+ * the COPYING file in the top-level directory.
+ *
+ * Contributions after 2012-01-13 are licensed under the terms of the
+ * GNU GPL, version 2 or (at your option) any later version.
+ */
+
+#include "qemu/osdep.h"
+#include "exec/memory.h"
+#include "qapi/qapi-commands-migration.h"
+
+void qmp_xen_set_global_dirty_log(bool enable, Error **errp)
+{
+ if (enable) {
+ memory_global_dirty_log_start();
+ } else {
+ memory_global_dirty_log_stop();
+ }
+}
diff --git a/hw/xen/meson.build b/hw/xen/meson.build
index 6c836ae06e4..21f94625dc7 100644
--- a/hw/xen/meson.build
+++ b/hw/xen/meson.build
@@ -4,6 +4,7 @@
'xen-bus.c',
'xen_devconfig.c',
'xen_pvdev.c',
+ 'xen-migration.c',
'xen-utils.c',
))
--
2.26.2
- [PATCH v3 0/7] hw/xen: Introduce XEN_FV/XEN_PV Kconfig, Philippe Mathieu-Daudé, 2021/02/01
- [PATCH v3 1/7] meson: Do not build Xen x86_64-softmmu on Aarch64, Philippe Mathieu-Daudé, 2021/02/01
- [PATCH v3 2/7] hw/xen: Relax dependency on FSDEV_9P, Philippe Mathieu-Daudé, 2021/02/01
- [PATCH v3 3/7] accel/xen: Incorporate xen-mapcache.c, Philippe Mathieu-Daudé, 2021/02/01
- [PATCH v3 4/7] hw/i386/xen: Introduce XEN_FV Kconfig, Philippe Mathieu-Daudé, 2021/02/01
- [PATCH v3 5/7] hw/xen: Make xen_shutdown_fatal_error() available out of X86 HVM, Philippe Mathieu-Daudé, 2021/02/01
- [PATCH v3 6/7] hw/xen: Make qmp_xen_set_global_dirty_log() available out of X86 HVM,
Philippe Mathieu-Daudé <=
- [PATCH v3 7/7] NOTFORMERGE hw/xen/Kconfig: Introduce XEN_PV config, Philippe Mathieu-Daudé, 2021/02/01