[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCHv5 1/6] QMP, Introduce xen-set-global-dirty-log command.
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@xxxxxxxxxxx> --- 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 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |