]> xenbits.xensource.com Git - qemu-upstream-4.2-testing.git/commitdiff
QMP, Introduce xen-set-global-dirty-log command.
authorAnthony PERARD <anthony.perard@citrix.com>
Thu, 21 Feb 2013 12:16:28 +0000 (12:16 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Thu, 21 Feb 2013 12:16:28 +0000 (12:16 +0000)
This command is used during a migration of a guest under Xen. It calls
cpu_physical_memory_set_dirty_tracking.

Backport of 39f42439d0629d3921629dc4b38e68df8f2f7b83

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Alex Bligh <alex@alex.org.uk>
qapi-schema.json
qmp-commands.hx
xen-all.c
xen-stub.c

index a669e981894c1043e74d8c2a684c34025c080cc8..bb0d7c526e9f6314947372049cc1131e8a8153a5 100644 (file)
 # Since: 1.1
 ##
 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
+
+##
+# @xen-set-global-dirty-log
+#
+# Enable or disable the global dirty log mode.
+#
+# @enable: true to enable, false to disable.
+#
+# Returns: nothing
+#
+# Since: 1.3
+##
+{ 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
index bf1df49dbdc9ca425f5eb4d370cbcf81258da1ac..0de68df6fe101b6f1c73cc67f44b9001ad172bcc 100644 (file)
@@ -469,6 +469,30 @@ Example:
      "arguments": { "filename": "/tmp/save" } }
 <- { "return": {} }
 
+EQMP
+
+    {
+        .name       = "xen-set-global-dirty-log",
+        .args_type  = "enable:b",
+        .mhandler.cmd_new = qmp_marshal_input_xen_set_global_dirty_log,
+    },
+
+SQMP
+xen-set-global-dirty-log
+-------
+
+Enable or disable the global dirty log mode.
+
+Arguments:
+
+- "enable": Enable it or disable it.
+
+Example:
+
+-> { "execute": "xen-set-global-dirty-log",
+     "arguments": { "enable": true } }
+<- { "return": {} }
+
 EQMP
 
     {
index 32565092fc7634d9a0c13999c3472aa1d4b6847f..6b4e511822f7174d4449a2200ab97c70278c4d30 100644 (file)
--- a/xen-all.c
+++ b/xen-all.c
@@ -12,6 +12,7 @@
 #include "hw/pc.h"
 #include "hw/xen_common.h"
 #include "hw/xen_backend.h"
+#include "qmp-commands.h"
 
 #include "range.h"
 #include "xen-mapcache.h"
@@ -524,6 +525,11 @@ static CPUPhysMemoryClient xen_cpu_phys_memory_client = {
     .log_stop = xen_log_stop,
 };
 
+void qmp_xen_set_global_dirty_log(bool enable, Error **errp)
+{
+    cpu_physical_memory_set_dirty_tracking(!!enable);
+}
+
 /* VCPU Operations, MMIO, IO ring ... */
 
 static void xen_reset_vcpu(void *opaque)
index efe2ab55f27a9e7ddfeaf61c1b881ba2d99a7f47..25317ec2ffb38948cb027e483832b6ad78a75de9 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "qemu-common.h"
 #include "hw/xen.h"
+#include "qmp-commands.h"
 
 void xenstore_store_pv_console_info(int i, CharDriverState *chr)
 {
@@ -43,3 +44,7 @@ int xen_init(void)
 {
     return -ENOSYS;
 }
+
+void qmp_xen_set_global_dirty_log(bool enable, Error **errp)
+{
+}