From: Alex Bligh <alex@alex.org.uk>
To: xen-devel <xen-devel@lists.xen.org>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
Ian Campbell <Ian.Campbell@citrix.com>,
Alex Bligh <alex@alex.org.uk>
Subject: [PATCH 1/5] QMP, Introduce xen-set-global-dirty-log command.
Date: Wed, 13 Feb 2013 18:33:41 +0000 [thread overview]
Message-ID: <1360780425-19607-2-git-send-email-alex@alex.org.uk> (raw)
In-Reply-To: <1360780425-19607-1-git-send-email-alex@alex.org.uk>
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: Alex Bligh <alex@alex.org.uk>
---
qapi-schema.json | 13 +++++++++++++
qmp-commands.hx | 24 ++++++++++++++++++++++++
xen-all.c | 6 ++++++
xen-stub.c | 5 +++++
4 files changed, 48 insertions(+), 0 deletions(-)
diff --git a/qapi-schema.json b/qapi-schema.json
index a669e98..bb0d7c5 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -905,3 +905,16 @@
# 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' } }
diff --git a/qmp-commands.hx b/qmp-commands.hx
index bf1df49..0de68df 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -472,6 +472,30 @@ Example:
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
+
+ {
.name = "migrate",
.args_type = "detach:-d,blk:-b,inc:-i,uri:s",
.params = "[-d] [-b] [-i] uri",
diff --git a/xen-all.c b/xen-all.c
index 3256509..6b4e511 100644
--- 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)
diff --git a/xen-stub.c b/xen-stub.c
index efe2ab5..25317ec 100644
--- a/xen-stub.c
+++ b/xen-stub.c
@@ -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)
+{
+}
--
1.7.4.1
next prev parent reply other threads:[~2013-02-13 18:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-13 18:33 QEMU: Enabling live-migrate on HVM on qemu-xen device model in 4.2 Alex Bligh
2013-02-13 18:33 ` Alex Bligh [this message]
2013-02-13 18:33 ` [PATCH 2/5] xen: Introduce xen_modified_memory Alex Bligh
2013-02-13 18:33 ` [PATCH 3/5] exec: Introduce helper to set dirty flags Alex Bligh
2013-02-13 18:33 ` [PATCH 4/5] exec, memory: Call to xen_modified_memory Alex Bligh
2013-02-13 18:33 ` [PATCH 5/5] xen: Set the vram dirty when an error occur Alex Bligh
-- strict thread matches above, loose matches on Subject: below --
2013-01-19 17:56 QEMU: Enabling live-migrate on HVM on qemu-xen device model in 4.2 Alex Bligh
2013-01-19 17:56 ` [PATCH 1/5] QMP, Introduce xen-set-global-dirty-log command Alex Bligh
2012-12-21 19:37 [RFC] QEMU: Enabling live-migrate on HVM on qemu-xen device model in 4.2 Alex Bligh
2012-12-21 19:37 ` [PATCH 1/5] QMP, Introduce xen-set-global-dirty-log command Alex Bligh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1360780425-19607-2-git-send-email-alex@alex.org.uk \
--to=alex@alex.org.uk \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).