Re: [Xen-devel] [RFC PATCH] tools: remove blktap2 related code and documentation

2016-08-16 Thread Yang Hongyang
t; > Ross, do you have any objection for this? I haven't seen update from the > joint blktap2 maintenance for a few months. > > Cc: Andrew Cooper > Cc: George Dunlap > Cc: Ian Jackson > Cc: Jan Beulich > Cc: Konrad Rzeszutek Wilk > Cc: Stefano Stabellini > C

Re: [Xen-devel] Current LibXL Status

2015-11-19 Thread Yang Hongyang
On 2015年11月19日 20:16, Ian Campbell wrote: On Thu, 2015-11-19 at 11:55 +, Ian Campbell wrote: On Thu, 2015-11-19 at 11:48 +, Ian Campbell wrote: On Thu, 2015-11-19 at 11:33 +, Andrew Cooper wrote: The majority of those are cases are not appropriate uses of exit(). AFAIIR, the *only

Re: [Xen-devel] [PATCH v1 COLO Pre 03/12] tools/libxc: export xc_bitops.h

2015-06-03 Thread Yang Hongyang
On 06/02/2015 06:11 PM, Andrew Cooper wrote: On 02/06/15 10:26, Yang Hongyang wrote: When we are under COLO, we will send dirty page bitmap info from secondary to primary at every checkpoint. So we need to get/test the dirty page bitmap. We just expose xc_bitops.h for libxl use. NOTE

Re: [Xen-devel] [PATCH v1 COLO Pre 03/12] tools/libxc: export xc_bitops.h

2015-06-04 Thread Yang Hongyang
On 06/04/2015 04:36 PM, Ian Campbell wrote: On Thu, 2015-06-04 at 09:01 +0800, Yang Hongyang wrote: On 06/02/2015 06:11 PM, Andrew Cooper wrote: On 02/06/15 10:26, Yang Hongyang wrote: When we are under COLO, we will send dirty page bitmap info from secondary to primary at every checkpoint

Re: [Xen-devel] [PATCH v2 0/6] Misc cleanups for libxl

2015-06-04 Thread Yang Hongyang
On 06/03/2015 06:51 PM, Andrew Cooper wrote: On 03/06/15 09:01, Yang Hongyang wrote: This patchset mainly focus on libxl save, most of the patches are simply move codes out of libxl_dom.c, except a refactor patch. Please see individual patch for detail. Can get the whole patchset from

[Xen-devel] [PATCH v2 COLOPre 06/13] tools/libxl: Introduce a new internal API libxl__domain_unpause()

2015-06-07 Thread Yang Hongyang
Signed-off-by: Yang Hongyang --- tools/libxl/libxl.c | 20 ++-- tools/libxl/libxl_internal.h | 1 + 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index ba2da92..d5691dc 100644 --- a/tools/libxl/libxl.c +++ b

[Xen-devel] [PATCH v2 COLOPre 00/13] Prerequisite patches for COLO

2015-06-07 Thread Yang Hongyang
.pl to support return data from xl to xc tools/libxl: Add back channel to allow migration target send data back Yang Hongyang (9): libxc/restore: fix error handle of process_record libxc/restore: zero ioreq page only one time tools/libxc: export xc_bitops.h tools/libxl: introduce a

[Xen-devel] [PATCH v2 COLOPre 07/13] tools/libxl: Update libxl__domain_unpause() to support qemu-xen

2015-06-07 Thread Yang Hongyang
Currently, libxl__domain_unpause() only supports qemu-xen-traditional. Update it to support qemu-xen. Signed-off-by: Wen Congyang Signed-off-by: Yang Hongyang --- tools/libxl/libxl.c | 42 +- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a

[Xen-devel] [PATCH v2 COLOPre 03/13] libxc/restore: zero ioreq page only one time

2015-06-07 Thread Yang Hongyang
nly zero it one time. Signed-off-by: Yang Hongyang Signed-off-by: Wen congyang CC: Andrew Cooper --- tools/libxc/xc_sr_restore_x86_hvm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/libxc/xc_sr_restore_x86_hvm.c b/tools/libxc/xc_sr_restore_x86_hvm.c index 6f5a

[Xen-devel] [PATCH v2 COLOPre 05/13] tools/libxl: introduce a new API libxl__domain_restore() to load qemu state

2015-06-07 Thread Yang Hongyang
e resuming secondary vm. Introduce a new API libxl__domain_restore() to do it. This API should be called before resuming secondary vm. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang --- tools/libxl/libxl_dom_save.c | 47 tools/libxl/libxl_

[Xen-devel] [PATCH v2 COLOPre 10/13] tools/libxl: Add back channel to allow migration target send data back

2015-06-07 Thread Yang Hongyang
From: Wen Congyang In colo mode, slave needs to send data to master, but the io_fd only can be written in master, and only can be read in slave. Save recv_fd in domain_suspend_state, and send_fd in domain_create_state. Signed-off-by: Wen Congyang Signed-off-by: Yang Hongyang --- tools/libxl

[Xen-devel] [PATCH v2 COLOPre 02/13] tools/libxc: support to resume uncooperative HVM guests

2015-06-07 Thread Yang Hongyang
. For HVM, the hypercall is a NOP. Signed-off-by: Wen Congyang Signed-off-by: Yang Hongyang --- tools/libxc/xc_resume.c | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/tools/libxc/xc_resume.c b/tools/libxc/xc_resume.c index e67bebd..bd82334 100644 -

[Xen-devel] [PATCH v2 COLOPre 01/13] libxc/restore: fix error handle of process_record

2015-06-07 Thread Yang Hongyang
If the err is RECORD_NOT_PROCESSED, and it is an optional record, restore will still fail. The patch fix this. Signed-off-by: Yang Hongyang CC: Ian Campbell CC: Ian Jackson CC: Wei Liu CC: Andrew Cooper --- tools/libxc/xc_sr_restore.c | 28 ++-- 1 file changed, 14

[Xen-devel] [PATCH v2 COLOPre 08/13] tools/libxl: introduce libxl__domain_common_switch_qemu_logdirty()

2015-06-07 Thread Yang Hongyang
k before exits. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang --- tools/libxl/libxl_dom_save.c | 78 ++-- tools/libxl/libxl_internal.h | 8 + 2 files changed, 54 insertions(+), 32 deletions(-) diff --git a/tools/libxl/libxl_dom_save.c b/too

[Xen-devel] [PATCH v2 COLOPre 11/13] tools/libxl: rename remus device to checkpoint device

2015-06-07 Thread Yang Hongyang
7; tools/libxl/libxl_internal.h 16. perl -pi -e 's/\bremus abstract/checkpoint abstract/g' tools/libxl/libxl_internal.h 17. perl -pi -e 's/\bremus invocation/checkpoint invocation/g' tools/libxl/libxl_internal.h 18. perl -pi -e 's/\blibxl__remus_device_\(/libxl__checkpoint_d

[Xen-devel] [PATCH v2 COLOPre 12/13] tools/libxl: adjust the indentation

2015-06-07 Thread Yang Hongyang
This is just tidying up after the previous automatic renaming. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang --- tools/libxl/libxl_checkpoint_device.c | 21 +++-- tools/libxl/libxl_internal.h | 19 +++ 2 files changed, 22 insertions(+), 18

[Xen-devel] [PATCH v2 COLOPre 09/13] tools/libxl: Update libxl_save_msgs_gen.pl to support return data from xl to xc

2015-06-07 Thread Yang Hongyang
From: Wen Congyang Currently, all callbacks return an integer value or void. We cannot return some data to xc via callback. Update libxl_save_msgs_gen.pl to support this case. Signed-off-by: Wen Congyang --- tools/libxl/libxl_internal.h | 3 ++ tools/libxl/libxl_save_callout.c | 31

[Xen-devel] [PATCH v2 COLOPre 04/13] tools/libxc: export xc_bitops.h

2015-06-07 Thread Yang Hongyang
When we are under COLO, we will send dirty page bitmap info from secondary to primary at every checkpoint. So we need to get/test the dirty page bitmap. We just expose xc_bitops.h for libxl use. NOTE: Need to make clean and rerun configure to get it compiled. Signed-off-by: Yang Hongyang

[Xen-devel] [PATCH v2 COLOPre 13/13] tools/libxl: don't touch remus in checkpoint_device

2015-06-07 Thread Yang Hongyang
lling libxl__checkpoint_devices_teardown(). Signed-off-by: Wen Congyang Signed-off-by: Yang Hongyang --- tools/libxl/libxl.c | 2 +- tools/libxl/libxl_checkpoint_device.c | 52 ++--- tools/libxl/libxl_dom_save.c | 3 +- tools/libxl/libxl_internal.h

[Xen-devel] [PATCH v6 COLO 11/15] COLO proxy: preresume, postresume and checkpoint

2015-06-07 Thread Yang Hongyang
preresume, postresume and checkpoint Signed-off-by: Yang Hongyang --- tools/libxl/libxl_colo.h | 3 +++ tools/libxl/libxl_colo_proxy.c | 57 ++ 2 files changed, 60 insertions(+) diff --git a/tools/libxl/libxl_colo.h b/tools/libxl/libxl_colo.h

[Xen-devel] [PATCH v6 COLO 13/15] setup and control colo proxy on primary side

2015-06-07 Thread Yang Hongyang
setup and control colo proxy on primary side Signed-off-by: Yang Hongyang --- tools/libxl/libxl_colo_save.c | 125 +++--- tools/libxl/libxl_internal.h | 1 + 2 files changed, 118 insertions(+), 8 deletions(-) diff --git a/tools/libxl/libxl_colo_save.c b

[Xen-devel] [PATCH v6 COLO 12/15] COLO nic: implement COLO nic subkind

2015-06-07 Thread Yang Hongyang
implement COLO nic subkind. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang --- tools/hotplug/Linux/Makefile | 1 + tools/hotplug/Linux/colo-proxy-setup | 131 +++ tools/libxl/Makefile | 1 + tools/libxl/libxl_colo_nic.c | 317

[Xen-devel] [PATCH v6 COLO 10/15] COLO proxy: implement setup/teardown of COLO proxy module

2015-06-07 Thread Yang Hongyang
setup/teardown of COLO proxy module. we use netlink to communicate with proxy module. Signed-off-by: Yang Hongyang --- tools/libxl/Makefile | 1 + tools/libxl/libxl_colo.h | 2 + tools/libxl/libxl_colo_proxy.c | 210 + tools/libxl

[Xen-devel] [PATCH v6 COLO 03/15] primary vm suspend/get_dirty_pfn/resume/checkpoint code

2015-06-07 Thread Yang Hongyang
b. Send LIBXL_COLO_NEW_CHECKPOINT to slave Signed-off-by: Wen Congyang Signed-off-by: Yang Hongyang --- tools/libxc/include/xenguest.h | 12 + tools/libxl/Makefile | 2 +- tools/libxl/libxl.c| 6 +- tools/libxl/libxl_colo.h | 10 + tools/libxl/libxl_c

[Xen-devel] [PATCH v6 COLO 02/15] secondary vm suspend/resume/checkpoint code

2015-06-07 Thread Yang Hongyang
tion. d. Send LIBXL_COLO_SVM_SUSPENDED to master. e. Send secondary vm's dirty page information to master(count + pfn list). Signed-off-by: Wen Congyang Signed-off-by: Yang Hongyang --- tools/libxc/include/xenguest.h | 20 + tools/libxl/Makefile |1 + tools/lib

[Xen-devel] [PATCH v6 COLO 04/15] libxc/restore: support COLO restore

2015-06-07 Thread Yang Hongyang
call the callbacks resume/checkpoint/suspend while secondary vm status is consistent with primary. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang CC: Andrew Cooper --- tools/libxc/xc_sr_common.h | 11 +-- tools/libxc/xc_sr_restore.c | 63

[Xen-devel] [PATCH v6 COLO 00/15] COarse-grain LOck-stepping Virtual Machines for Non-stop Service

2015-06-07 Thread Yang Hongyang
ary vm implement the cmdline for COLO Support colo mode for qemu disk COLO: use qemu block replication Yang Hongyang (9): docs: add colo readme libxc/restore: support COLO restore libxc/save: support COLO save COLO proxy: implement setup/teardown of COLO proxy module COLO proxy: pre

[Xen-devel] [PATCH v6 COLO 07/15] implement the cmdline for COLO

2015-06-07 Thread Yang Hongyang
From: Wen Congyang Add a new option -c to the command 'xl remus'. If you want to use COLO HA instead of Remus HA, please use -c option. Update man pages to reflect the addition of a new option to 'xl remus' command. Also add a new option -c to the internal command 'xl migrate-receive'. Signed-

[Xen-devel] [PATCH v6 COLO 08/15] Support colo mode for qemu disk

2015-06-07 Thread Yang Hongyang
From: Wen Congyang Usage: disk = ['...,colo,colo-params=xxx,active-disk=xxx,hidden-disk=xxx...'] The format of colo-params: host:port:exportname=xx Signed-off-by: Wen Congyang Signed-off-by: Yang Hongyang --- docs/man/xl.pod.1 | 2 +- tools/libxl/libxl.c

[Xen-devel] [PATCH v6 COLO 05/15] send store mfn and console mfn to xl before resuming secondary vm

2015-06-07 Thread Yang Hongyang
mfn and console mfn to xl. Signed-off-by: Wen Congyang Signed-off-by: Yang Hongyang CC: Andrew Cooper --- tools/libxc/include/xenguest.h | 8 tools/libxc/xc_sr_restore.c| 8 ++-- tools/libxl/libxl_colo_restore.c | 5 - tools/libxl/libxl_create.c | 1

[Xen-devel] [PATCH v6 COLO 09/15] COLO: use qemu block replication

2015-06-07 Thread Yang Hongyang
From: Wen Congyang The guest should be paused before doing COLO!!! Signed-off-by: Wen Congyang --- tools/libxl/Makefile | 1 + tools/libxl/libxl_colo_qdisk.c | 209 +++ tools/libxl/libxl_colo_restore.c | 21 +++- tools/libxl/libxl_colo_save.

[Xen-devel] [PATCH v6 COLO 01/15] docs: add colo readme

2015-06-07 Thread Yang Hongyang
add colo readme, refer to http://wiki.xen.org/wiki/COLO_-_Coarse_Grain_Lock_Stepping Signed-off-by: Yang Hongyang --- docs/README.colo | 9 + 1 file changed, 9 insertions(+) create mode 100644 docs/README.colo diff --git a/docs/README.colo b/docs/README.colo new file mode 100644 index

[Xen-devel] [PATCH v6 COLO 06/15] libxc/save: support COLO save

2015-06-07 Thread Yang Hongyang
call callbacks->get_dirty_pfn() after suspend primary vm to get dirty pages on secondary vm, and send pages both dirty on primary/secondary to secondary. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang CC: Andrew Cooper --- tools/libxc/xc_sr_save.c |

[Xen-devel] [PATCH v6 COLO 14/15] setup and control colo proxy on secondary side

2015-06-07 Thread Yang Hongyang
setup and control colo proxy on secondary side Signed-off-by: Yang Hongyang --- tools/libxl/libxl_colo_restore.c | 28 +--- tools/libxl/libxl_internal.h | 3 +++ 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/tools/libxl/libxl_colo_restore.c b/tools

[Xen-devel] [PATCH v6 COLO 15/15] cmdline switches and config vars to control colo-proxy

2015-06-07 Thread Yang Hongyang
Add cmdline switches to 'xl migrate-receive' command to specify a domain-specific hotplug script to setup COLO proxy. Add a new config var 'colo.default.agentscript' to xl.conf, that allows the user to override the default global script used to setup COLO proxy. Signed-o

Re: [Xen-devel] Xen 4.6 Development Update (five months reminder, 5 WEEKS TO FREEZE)

2015-06-07 Thread Yang Hongyang
- Ian Campbell * Remus using migration-v2 (good) RFC posted - depends on v6 of 'New Migration' - Yang Hongyang Done. * Migration v2 (libxl) (none) - Andrew Cooper [...] * COarse-grain LOck-stepping Virtual Machines in Xen (fair) RFC v5 posted - Wen Congyang

Re: [Xen-devel] [PATCH v2 COLOPre 01/13] libxc/restore: fix error handle of process_record

2015-06-08 Thread Yang Hongyang
On 06/08/2015 05:24 PM, Andrew Cooper wrote: On 08/06/15 04:43, Yang Hongyang wrote: If the err is RECORD_NOT_PROCESSED, and it is an optional record, restore will still fail. The patch fix this. Signed-off-by: Yang Hongyang CC: Ian Campbell CC: Ian Jackson CC: Wei Liu CC: Andrew Cooper

Re: [Xen-devel] [PATCH v2 COLOPre 03/13] libxc/restore: zero ioreq page only one time

2015-06-08 Thread Yang Hongyang
On 06/08/2015 05:46 PM, Andrew Cooper wrote: On 08/06/15 04:43, Yang Hongyang wrote: ioreq page contains evtchn which will be set when we resume the secondary vm the first time. The hypervisor will check if the evtchn is corrupted, so we cannot zero the ioreq page more than one time. The

Re: [Xen-devel] [PATCH v2 COLOPre 04/13] tools/libxc: export xc_bitops.h

2015-06-08 Thread Yang Hongyang
Just to note that xc_bitops.h needs cleanup as Andy pointed out in v1... It will done in v3. On 06/08/2015 11:43 AM, Yang Hongyang wrote: When we are under COLO, we will send dirty page bitmap info from secondary to primary at every checkpoint. So we need to get/test the dirty page bitmap. We

Re: [Xen-devel] [PATCH v6 COLO 04/15] libxc/restore: support COLO restore

2015-06-08 Thread Yang Hongyang
On 06/08/2015 06:39 PM, Andrew Cooper wrote: On 08/06/15 04:45, Yang Hongyang wrote: call the callbacks resume/checkpoint/suspend while secondary vm status is consistent with primary. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang CC: Andrew Cooper --- tools/libxc

Re: [Xen-devel] [PATCH v6 COLO 05/15] send store mfn and console mfn to xl before resuming secondary vm

2015-06-08 Thread Yang Hongyang
On 06/08/2015 08:16 PM, Andrew Cooper wrote: On 08/06/15 04:45, Yang Hongyang wrote: From: Wen Congyang We will call libxl__xc_domain_restore_done() to rebuild secondary vm. But we need store mfn and console mfn when rebuilding secondary vm. So make restore_results is a function pointers in

Re: [Xen-devel] [PATCH v2 COLOPre 03/13] libxc/restore: zero ioreq page only one time

2015-06-08 Thread Yang Hongyang
On 06/08/2015 06:15 PM, Andrew Cooper wrote: On 08/06/15 10:58, Yang Hongyang wrote: On 06/08/2015 05:46 PM, Andrew Cooper wrote: On 08/06/15 04:43, Yang Hongyang wrote: ioreq page contains evtchn which will be set when we resume the secondary vm the first time. The hypervisor will check

Re: [Xen-devel] [PATCH v6 COLO 06/15] libxc/save: support COLO save

2015-06-08 Thread Yang Hongyang
On 06/08/2015 09:04 PM, Andrew Cooper wrote: On 08/06/15 04:45, Yang Hongyang wrote: call callbacks->get_dirty_pfn() after suspend primary vm to get dirty pages on secondary vm, and send pages both dirty on primary/secondary to secondary. Signed-off-by: Yang Hongyang Signed-off-by:

Re: [Xen-devel] [PATCH v6 COLO 06/15] libxc/save: support COLO save

2015-06-08 Thread Yang Hongyang
On 06/08/2015 09:04 PM, Andrew Cooper wrote: On 08/06/15 04:45, Yang Hongyang wrote: call callbacks->get_dirty_pfn() after suspend primary vm to get dirty pages on secondary vm, and send pages both dirty on primary/secondary to secondary. Signed-off-by: Yang Hongyang Signed-off-by:

Re: [Xen-devel] save & restore failed when tmem enabled in Xen 4.1 & Xen 4.3

2015-06-09 Thread Yang Hongyang
On 06/08/2015 02:30 PM, yunfang tai wrote: Hi Andrew, Thank you for your reply! I do not know much about migration V2. Was it integrated to Xen? If integrated, from which version? It's intended to be integrated to Xen4.6. However, the libxc part has already been merged into upstream

Re: [Xen-devel] [PATCH v6 COLO 06/15] libxc/save: support COLO save

2015-06-09 Thread Yang Hongyang
On 06/09/2015 03:20 PM, Andrew Cooper wrote: On 09/06/2015 04:15, Yang Hongyang wrote: On 06/08/2015 09:04 PM, Andrew Cooper wrote: On 08/06/15 04:45, Yang Hongyang wrote: call callbacks->get_dirty_pfn() after suspend primary vm to get dirty pages on secondary vm, and send pages b

Re: [Xen-devel] [PATCH v6 COLO 06/15] libxc/save: support COLO save

2015-06-09 Thread Yang Hongyang
On 06/09/2015 04:51 PM, Andrew Cooper wrote: On 09/06/15 09:45, Yang Hongyang wrote: Even if there are no dirty pages on secondary, pfn_list shouldn't be NULL, it's just that pfn_list[0] will be 0. if pfn_list is NULL, there might be unexpected error happened. get_dirty_pfn()

Re: [Xen-devel] [PATCH v6 COLO 06/15] libxc/save: support COLO save

2015-06-09 Thread Yang Hongyang
On 06/09/2015 05:10 PM, Andrew Cooper wrote: On 09/06/15 10:09, Yang Hongyang wrote: Shouldn't get_dirty_pfn be mandatory for COLO streams (even if it is a noop to start with) ? It should be mandatory, it shouldn't be noop under COLO. perhaps we should add sanity ch

Re: [Xen-devel] [PATCH v2 COLOPre 03/13] libxc/restore: zero ioreq page only one time

2015-06-09 Thread Yang Hongyang
On 06/09/2015 03:30 PM, Andrew Cooper wrote: On 09/06/2015 01:59, Yang Hongyang wrote: On 06/08/2015 06:15 PM, Andrew Cooper wrote: On 08/06/15 10:58, Yang Hongyang wrote: On 06/08/2015 05:46 PM, Andrew Cooper wrote: On 08/06/15 04:43, Yang Hongyang wrote: ioreq page contains evtchn

Re: [Xen-devel] [PATCH v2 COLOPre 04/13] tools/libxc: export xc_bitops.h

2015-06-10 Thread Yang Hongyang
On 06/10/2015 11:20 PM, Ian Campbell wrote: On Mon, 2015-06-08 at 11:43 +0800, Yang Hongyang wrote: When we are under COLO, we will send dirty page bitmap info from secondary to primary at every checkpoint. ... and this is a _libxl_ operation? Is that the right layer here? For the first

Re: [Xen-devel] [PATCH v2 COLOPre 05/13] tools/libxl: introduce a new API libxl__domain_restore() to load qemu state

2015-06-10 Thread Yang Hongyang
On 06/10/2015 11:35 PM, Ian Campbell wrote: On Mon, 2015-06-08 at 11:43 +0800, Yang Hongyang wrote: Secondary vm is running in colo mode. So we will do the following things again and again: 1. suspend both primay vm and secondary vm 2. sync the state 3. resume both primary vm and secondary vm

Re: [Xen-devel] [PATCH v2 COLOPre 01/13] libxc/restore: fix error handle of process_record

2015-06-10 Thread Yang Hongyang
On 06/10/2015 10:55 PM, Ian Campbell wrote: On Mon, 2015-06-08 at 11:43 +0800, Yang Hongyang wrote: If the err is RECORD_NOT_PROCESSED, and it is an optional record, restore will still fail. The patch fix this. Whichever approach you take to fixing this, please say _how_ the change fixes it

Re: [Xen-devel] [PATCH v2 COLOPre 06/13] tools/libxl: Introduce a new internal API libxl__domain_unpause()

2015-06-10 Thread Yang Hongyang
On 06/10/2015 11:37 PM, Ian Campbell wrote: On Mon, 2015-06-08 at 11:43 +0800, Yang Hongyang wrote: From: Wen Congyang The guest is paused after libxl_domain_create_restore(). Secondary vm is running in colo mode. So we need to unpause the guest. The current API libxl_domain_unpause() is

Re: [Xen-devel] [PATCH v2 COLOPre 05/13] tools/libxl: introduce a new API libxl__domain_restore() to load qemu state

2015-06-11 Thread Yang Hongyang
On 06/11/2015 04:43 PM, Ian Campbell wrote: On Thu, 2015-06-11 at 10:09 +0800, Yang Hongyang wrote: On 06/10/2015 11:35 PM, Ian Campbell wrote: On Mon, 2015-06-08 at 11:43 +0800, Yang Hongyang wrote: Secondary vm is running in colo mode. So we will do the following things again and again

Re: [Xen-devel] [PATCH v2 COLOPre 03/13] libxc/restore: zero ioreq page only one time

2015-06-11 Thread Yang Hongyang
On 06/11/2015 07:14 PM, Wen Congyang wrote: On 06/11/2015 06:20 PM, Paul Durrant wrote: -Original Message- From: Wen Congyang [mailto:we...@cn.fujitsu.com] Sent: 11 June 2015 09:48 To: Paul Durrant; Andrew Cooper; Yang Hongyang; xen-devel@lists.xen.org Cc: Wei Liu; Ian Campbell

Re: [Xen-devel] [PATCH v2 COLOPre 03/13] libxc/restore: zero ioreq page only one time

2015-06-11 Thread Yang Hongyang
On 06/11/2015 06:20 PM, Paul Durrant wrote: -Original Message- From: Wen Congyang [mailto:we...@cn.fujitsu.com] Sent: 11 June 2015 09:48 To: Paul Durrant; Andrew Cooper; Yang Hongyang; xen-devel@lists.xen.org Cc: Wei Liu; Ian Campbell; guijianf...@cn.fujitsu.com; [...] In our

Re: [Xen-devel] [PATCH v2 COLOPre 03/13] libxc/restore: zero ioreq page only one time

2015-06-11 Thread Yang Hongyang
On 06/11/2015 08:54 PM, Yang Hongyang wrote: [...] this patch now. Ok, this really is a historical patch... Having tested, it is ok to drop this patch now. Thanks Wen Congyang In our implementation, we don't start a new emulator. The codes can work, but some bugs may b

Re: [Xen-devel] [PATCH v2 COLOPre 07/13] tools/libxl: Update libxl__domain_unpause() to support qemu-xen

2015-06-14 Thread Yang Hongyang
On 06/12/2015 08:33 PM, Wei Liu wrote: On Mon, Jun 08, 2015 at 11:43:11AM +0800, Yang Hongyang wrote: Currently, libxl__domain_unpause() only supports qemu-xen-traditional. Update it to support qemu-xen. Signed-off-by: Wen Congyang Signed-off-by: Yang Hongyang This looks very similar to

Re: [Xen-devel] [PATCH v2 COLOPre 10/13] tools/libxl: Add back channel to allow migration target send data back

2015-06-14 Thread Yang Hongyang
On 06/12/2015 08:54 PM, Wei Liu wrote: On Mon, Jun 08, 2015 at 11:43:14AM +0800, Yang Hongyang wrote: From: Wen Congyang In colo mode, slave needs to send data to master, but the io_fd only can be written in master, and only can be read in slave. Save recv_fd in domain_suspend_state, and

Re: [Xen-devel] [PATCH v2 COLOPre 10/13] tools/libxl: Add back channel to allow migration target send data back

2015-06-14 Thread Yang Hongyang
On 06/12/2015 11:04 PM, Ian Jackson wrote: Wei Liu writes ("Re: [Xen-devel] [PATCH v2 COLOPre 10/13] tools/libxl: Add back channel to allow migration target send data back"): On Mon, Jun 08, 2015 at 11:43:14AM +0800, Yang Hongyang wrote: From: Wen Congyang In colo mode, slav

Re: [Xen-devel] [PATCH v2 COLOPre 11/13] tools/libxl: rename remus device to checkpoint device

2015-06-14 Thread Yang Hongyang
On 06/12/2015 10:57 PM, Ian Jackson wrote: Wei Liu writes ("Re: [Xen-devel] [PATCH v2 COLOPre 11/13] tools/libxl: rename remus device to checkpoint device"): On Fri, Jun 12, 2015 at 02:30:46PM +0100, Wei Liu wrote: On Mon, Jun 08, 2015 at 11:43:15AM +0800, Yang Hongyang wrote:

Re: [Xen-devel] [PATCH v2 COLOPre 13/13] tools/libxl: don't touch remus in checkpoint_device

2015-06-14 Thread Yang Hongyang
On 06/12/2015 09:28 PM, Wei Liu wrote: On Mon, Jun 08, 2015 at 11:43:17AM +0800, Yang Hongyang wrote: Checkpoint device is an abstract layer to do checkpoint. COLO can also use it to do checkpoint. But there are still some codes in checkpoint device which touch remus: 1. remus_ops: we use

Re: [Xen-devel] [PATCH v2 COLOPre 04/13] tools/libxc: export xc_bitops.h

2015-06-14 Thread Yang Hongyang
On 06/11/2015 06:55 PM, Ian Campbell wrote: On Thu, 2015-06-11 at 11:45 +0100, Andrew Cooper wrote: On 11/06/15 09:41, Ian Campbell wrote: On Thu, 2015-06-11 at 10:07 +0800, Yang Hongyang wrote: On 06/10/2015 11:20 PM, Ian Campbell wrote: On Mon, 2015-06-08 at 11:43 +0800, Yang Hongyang

Re: [Xen-devel] [PATCH v6 COLO 02/15] secondary vm suspend/resume/checkpoint code

2015-06-14 Thread Yang Hongyang
On 06/12/2015 10:23 PM, Wei Liu wrote: On Mon, Jun 08, 2015 at 11:45:46AM +0800, Yang Hongyang wrote: From: Wen Congyang Secondary vm is running in colo mode. So we will do the following things again and again: 1. Resume secondary vm a. Send LIBXL_COLO_SVM_READY to master. b. If it

Re: [Xen-devel] [PATCH v6 COLO 02/15] secondary vm suspend/resume/checkpoint code

2015-06-14 Thread Yang Hongyang
Hi Ian J, Wei, On 06/12/2015 10:51 PM, Ian Jackson wrote: Wei Liu writes ("Re: [Xen-devel] [PATCH v6 COLO 02/15] secondary vm suspend/resume/checkpoint code"): On Mon, Jun 08, 2015 at 11:45:46AM +0800, Yang Hongyang wrote: From: Wen Congyang +crcs->status = LIBXL

Re: [Xen-devel] [PATCH v6 COLO 12/15] COLO nic: implement COLO nic subkind

2015-06-14 Thread Yang Hongyang
On 06/12/2015 10:35 PM, Wei Liu wrote: On Mon, Jun 08, 2015 at 11:45:56AM +0800, Yang Hongyang wrote: implement COLO nic subkind. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang --- tools/hotplug/Linux/Makefile | 1 + tools/hotplug/Linux/colo-proxy-setup | 131

Re: [Xen-devel] [PATCH 00/27] Libxl migration v2

2015-06-15 Thread Yang Hongyang
On 06/15/2015 09:44 PM, Andrew Cooper wrote: This series adds support for the libxl migration v2 stream, and untangles the existing layering violations of the toolstack and qemu records. At the end of the series, legacy migration is no longer used. Note: Remus support is broken and (RFC) fixe

Re: [Xen-devel] [PATCH 24/27] tools/libx{c, l}: [RFC] Introduce restore_callbacks.checkpoint()

2015-06-15 Thread Yang Hongyang
On 06/15/2015 09:44 PM, Andrew Cooper wrote: And call it when a checkpoint record is found in the libxc stream. Signed-off-by: Andrew Cooper CC: Ian Campbell CC: Ian Jackson CC: Wei Liu --- tools/libxc/include/xenguest.h |3 +++ tools/libxc/xc_sr_restore.c| 15

Re: [Xen-devel] [PATCH v2 1/6] tools/libxl: rename libxl__domain_suspend to libxl__domain_save

2015-06-16 Thread Yang Hongyang
On 06/16/2015 08:59 PM, Ian Campbell wrote: On Wed, 2015-06-03 at 16:01 +0800, Yang Hongyang wrote: Rename libxl__domain_suspend() to libxl__domain_save() since it actually do the save domain work. This results in some strangeness in that some functions called *save* are now passed a struct

Re: [Xen-devel] [PATCH v2 3/6] tools/libxl: move domain resume code into libxl_dom_suspend.c

2015-06-16 Thread Yang Hongyang
On 06/16/2015 09:04 PM, Ian Campbell wrote: On Wed, 2015-06-03 at 16:01 +0800, Yang Hongyang wrote: move domain resume code into libxl_dom_suspend.c. Even though it has "resume" in the name, I'm not sure that libxl__domain_s3_resume is a good candidate for moving to the sus

Re: [Xen-devel] [PATCH v2 2/6] tools/libxl: move domain suspend code into libxl_dom_suspend.c

2015-06-16 Thread Yang Hongyang
On 06/16/2015 09:00 PM, Ian Campbell wrote: On Wed, 2015-06-03 at 16:01 +0800, Yang Hongyang wrote: Move domain suspend code into a separate file libxl_dom_suspend.c. export an API libxl__domain_suspend() which wrappers the static just "..which wraps the..." will fix,

Re: [Xen-devel] [PATCH v2 4/6] tools/libxl: move remus code into libxl_remus.c

2015-06-16 Thread Yang Hongyang
On 06/16/2015 09:08 PM, Ian Campbell wrote: On Wed, 2015-06-03 at 16:01 +0800, Yang Hongyang wrote: move remus code into libxl_remus.c. Please say something like "... by refactoring bits of libxl_domain_remus_start and domain_save_done into X and Y and moving the remaining function

Re: [Xen-devel] [PATCH v2 5/6] tools/libxl: move save/restore code into libxl_dom_save.c

2015-06-16 Thread Yang Hongyang
On 06/16/2015 09:09 PM, Ian Campbell wrote: On Wed, 2015-06-03 at 16:01 +0800, Yang Hongyang wrote: move save/restore code into libxl_dom_save.c. If this (unlike other patches in the series) is purely code motion please indicate that this is the case. You might also like to consider

Re: [Xen-devel] [PATCH v2 COLOPre 09/13] tools/libxl: Update libxl_save_msgs_gen.pl to support return data from xl to xc

2015-06-16 Thread Yang Hongyang
Hi Ian, On 06/16/2015 07:05 PM, Ian Jackson wrote: Yang Hongyang writes ("[Xen-devel] [PATCH v2 COLOPre 09/13] tools/libxl: Update libxl_save_msgs_gen.pl to support return data from xl to xc"): From: Wen Congyang Currently, all callbacks return an integer value or void. We canno

Re: [Xen-devel] [PATCH 20/27] tools/libxl: Infrastructure for writing a v2 stream

2015-06-16 Thread Yang Hongyang
On 06/15/2015 09:44 PM, Andrew Cooper wrote: [...] + +static void write_emulator_record(libxl__egc *egc, + libxl__stream_write_state *stream) +{ +libxl__domain_suspend_state *dss = CONTAINER_OF(stream, *dss, sws); +libxl__datacopier_state *dc = &stream->

Re: [Xen-devel] [PATCH 20/27] tools/libxl: Infrastructure for writing a v2 stream

2015-06-17 Thread Yang Hongyang
On 06/15/2015 09:44 PM, Andrew Cooper wrote: [...] + +static void stream_success(libxl__egc *egc, + libxl__stream_write_state *stream); +static void stream_failed(libxl__egc *egc, + libxl__stream_write_state *stream, int ret); +static void stre

Re: [Xen-devel] [PATCH 24/27] tools/libx{c, l}: [RFC] Introduce restore_callbacks.checkpoint()

2015-06-17 Thread Yang Hongyang
On 06/15/2015 09:44 PM, Andrew Cooper wrote: And call it when a checkpoint record is found in the libxc stream. Signed-off-by: Andrew Cooper CC: Ian Campbell CC: Ian Jackson CC: Wei Liu --- tools/libxc/include/xenguest.h |3 +++ tools/libxc/xc_sr_restore.c| 15

Re: [Xen-devel] [PATCH v2 COLOPre 07/13] tools/libxl: Update libxl__domain_unpause() to support qemu-xen

2015-06-17 Thread Yang Hongyang
On 06/16/2015 12:22 AM, Wei Liu wrote: On Mon, Jun 15, 2015 at 09:29:55AM +0800, Yang Hongyang wrote: On 06/12/2015 08:33 PM, Wei Liu wrote: On Mon, Jun 08, 2015 at 11:43:11AM +0800, Yang Hongyang wrote: Currently, libxl__domain_unpause() only supports qemu-xen-traditional. Update it to

Re: [Xen-devel] [PATCH 03/27] tools/libxl: Stash all restore parameters in domain_create_state

2015-06-17 Thread Yang Hongyang
On 06/15/2015 09:44 PM, Andrew Cooper wrote: Shortly more parameters will appear, and this saves unboxing each one. No functional change. Signed-off-by: Andrew Cooper CC: Ian Campbell CC: Ian Jackson CC: Wei Liu Reviewed-by: Yang Hongyang --- tools/libxl/libxl_create.c

Re: [Xen-devel] [PATCH v6 COLO 01/15] docs: add colo readme

2015-06-24 Thread Yang Hongyang
On 06/16/2015 06:56 PM, Ian Campbell wrote: On Mon, 2015-06-08 at 11:45 +0800, Yang Hongyang wrote: add colo readme, refer to http://wiki.xen.org/wiki/COLO_-_Coarse_Grain_Lock_Stepping Signed-off-by: Yang Hongyang This is fine as far as it goes but I wonder if perhaps docs/README.{remus

[Xen-devel] [PATCH] Remus: update email address in MAINTAINERS file

2016-03-01 Thread Yang Hongyang
From: Yang Hongyang Signed-off-by: Yang Hongyang Cc: Shriram Rajagopalan Cc: Wei Liu Cc: Ian Jackson Cc: Ian Campbell --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index db14cfe..27280a4 100644 --- a/MAINTAINERS +++ b

Re: [Xen-devel] [PATCH v2 COLOPre 11/13] tools/libxl: rename remus device to checkpoint device

2015-06-24 Thread Yang Hongyang
On 06/16/2015 06:53 PM, Ian Campbell wrote: On Mon, 2015-06-15 at 17:24 +0100, Wei Liu wrote: On Mon, Jun 15, 2015 at 09:45:54AM +0800, Yang Hongyang wrote: On 06/12/2015 10:57 PM, Ian Jackson wrote: Wei Liu writes ("Re: [Xen-devel] [PATCH v2 COLOPre 11/13] tools/libxl: rename

Re: [Xen-devel] [PATCH v6 COLO 07/15] implement the cmdline for COLO

2015-06-24 Thread Yang Hongyang
On 06/16/2015 07:19 PM, Ian Campbell wrote: On Mon, 2015-06-08 at 11:45 +0800, Yang Hongyang wrote: From: Wen Congyang Add a new option -c to the command 'xl remus'. If you want to use COLO HA instead of Remus HA, please use -c option. Update man pages to reflect the additio

Re: [Xen-devel] [PATCH v6 COLO 10/15] COLO proxy: implement setup/teardown of COLO proxy module

2015-06-24 Thread Yang Hongyang
On 06/16/2015 07:26 PM, Ian Campbell wrote: On Tue, 2015-06-16 at 12:24 +0100, Ian Campbell wrote: On Mon, 2015-06-08 at 11:45 +0800, Yang Hongyang wrote: setup/teardown of COLO proxy module. we use netlink to communicate with proxy module. What is a COLO proxy module and where would one

[Xen-devel] [PATCH v3 COLOPre 01/26] tools/libxl: rename libxl__domain_suspend to libxl__domain_save

2015-06-24 Thread Yang Hongyang
. Signed-off-by: Yang Hongyang CC: Ian Campbell CC: Ian Jackson CC: Wei Liu CC: Andrew Cooper --- tools/libxl/libxl.c | 4 ++-- tools/libxl/libxl_dom.c | 14 +++--- tools/libxl/libxl_internal.h | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a

[Xen-devel] [PATCH v3 COLOPre 02/26] tools/libxl: move domain suspend code into libxl_dom_suspend.c

2015-06-24 Thread Yang Hongyang
. Note that the newly added file libxl_dom_suspend.c is used for suspend/resume code. Signed-off-by: Yang Hongyang CC: Ian Jackson CC: Wei Liu Acked-by: Ian Campbell --- tools/libxl/Makefile| 2 +- tools/libxl/libxl_dom.c | 346 +--- tools

[Xen-devel] [PATCH v3 COLOPre 00/26] Prerequisite patches for COLO

2015-06-24 Thread Yang Hongyang
channel docs/libxl: Introduce COLO_CONTEXT to support migration v2 colo streams Yang Hongyang (21): tools/libxl: rename libxl__domain_suspend to libxl__domain_save tools/libxl: move domain suspend code into libxl_dom_suspend.c tools/libxl: move domain resume code into libxl_dom_suspend.

[Xen-devel] [PATCH v3 COLOPre 03/26] tools/libxl: move domain resume code into libxl_dom_suspend.c

2015-06-24 Thread Yang Hongyang
move domain resume code into libxl_dom_suspend.c. pure code motion except for making libxl__domain_resume_device_model() static. Signed-off-by: Yang Hongyang CC: Ian Campbell CC: Ian Jackson CC: Wei Liu --- tools/libxl/libxl.c | 33 - tools/libxl

[Xen-devel] [PATCH v3 COLOPre 04/26] tools/libxl: move remus code into libxl_remus.c

2015-06-24 Thread Yang Hongyang
* libxl__remus_domain_resume_callback * libxl__remus_domain_save_checkpoint_callback * libxl__remus_domain_restore_checkpoint_callback - Refactoring Remus setup/teardown, introduce 2 APIs to setup/teardown Remus: * libxl__remus_setup * libxl__remus_teardown Signed-off-by: Yang Hongyang CC: Ian Campbell CC: Ian

[Xen-devel] [PATCH v3 COLOPre 09/26] tools/libxl: introduce enum type libxl_checkpointed_stream

2015-06-24 Thread Yang Hongyang
introduce enum type libxl_checkpointed_stream in IDL. rename the last argument of migrate_receive from "remus" to "checkpointed" since the semantics of this parameter has changed. Signed-off-by: Yang Hongyang --- tools/libxl/libxl_types.idl | 5 + tools/libxl/

[Xen-devel] [PATCH v3 COLOPre 05/26] tools/libxl: move save/restore code into libxl_dom_save.c

2015-06-24 Thread Yang Hongyang
This is purely code motion. Signed-off-by: Yang Hongyang CC: Ian Campbell CC: Ian Jackson CC: Wei Liu --- tools/libxl/Makefile | 2 +- tools/libxl/libxl_dom.c | 607 - tools/libxl/libxl_dom_save.c | 634

[Xen-devel] [PATCH v3 COLOPre 06/26] libxl/save: Refactor libxl__domain_suspend_state

2015-06-24 Thread Yang Hongyang
stands for libxl__domain_save_state, dsps stands for libxl__domain_suspend_state. Signed-off-by: Yang Hongyang CC: Ian Campbell CC: Ian Jackson CC: Wei Liu CC: Andrew Cooper --- tools/libxl/libxl.c | 10 +-- tools/libxl/libxl_dom_save.c | 74 + tools/libxl

[Xen-devel] [PATCH v3 COLOPre 07/26] libxc/restore: fix error handle of process_record

2015-06-24 Thread Yang Hongyang
cates a failover, that needs to be handled in restore(), so moving the error handling out to make the logic clearer...Otherwise, in process_record, RECORD_NOT_PROCESSED is handled, and in restore another error type returned from process_record is handled. Signed-off-by: Yang Hongyang CC: Ian Cam

[Xen-devel] [PATCH v3 COLOPre 08/26] tools/libxc: support to resume uncooperative HVM guests

2015-06-24 Thread Yang Hongyang
est state, otherwise call libxl__domain_resume(..., 0). Signed-off-by: Wen Congyang Signed-off-by: Yang Hongyang --- tools/libxc/xc_resume.c | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/tools/libxc/xc_resume.c b/tools/libxc/xc_resume.c index e67bebd..bd82334

[Xen-devel] [PATCH v3 COLOPre 13/26] tools/libxl: introduce libxl__domain_common_switch_qemu_logdirty()

2015-06-24 Thread Yang Hongyang
k before exits. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang Acked-by: Ian Campbell --- tools/libxl/libxl_dom_save.c | 78 ++-- tools/libxl/libxl_internal.h | 8 + 2 files changed, 54 insertions(+), 32 deletions(-) diff --git a/too

[Xen-devel] [PATCH v3 COLOPre 14/26] tools/libxl: export logdirty_init

2015-06-24 Thread Yang Hongyang
We need to enable logdirty on secondary, so we export logdirty_init for internal use. Rename it to libxl__logdirty_init. Signed-off-by: Yang Hongyang --- tools/libxl/libxl_dom_save.c | 4 ++-- tools/libxl/libxl_internal.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a

[Xen-devel] [PATCH v3 COLOPre 10/26] migration/save: pass checkpointed_stream from libxl to libxc

2015-06-24 Thread Yang Hongyang
Pass checkpointed_stream from libxl to libxc. It won't affact legacy migration because legacy migration won't use this param. Signed-off-by: Yang Hongyang CC: Ian Campbell CC: Ian Jackson CC: Wei Liu CC: Andrew Cooper --- tools/libxc/include/xenguest.h | 9 ++--- t

[Xen-devel] [PATCH v3 COLOPre 12/26] tools/libxl: Update libxl_domain_unpause() to support qemu-xen

2015-06-24 Thread Yang Hongyang
Currently, libxl__domain_unpause() only supports qemu-xen-traditional. Update it to support qemu-xen. We use libxl__domain_resume_device_model to unpause guest dm. Signed-off-by: Yang Hongyang --- tools/libxl/libxl.c | 15 +-- tools/libxl/libxl_dom_suspend.c | 15

[Xen-devel] [PATCH v3 COLOPre 18/26] tools/libx{l, c}: add postcopy/suspend callback to restore side

2015-06-24 Thread Yang Hongyang
Secondary(restore side) is running under COLO, we also need postcopy/suspend callbacks. Signed-off-by: Yang Hongyang --- tools/libxc/include/xenguest.h | 10 ++ tools/libxl/libxl_save_msgs_gen.pl | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tools/libxc

[Xen-devel] [PATCH v3 COLOPre 11/26] tools/libxl: introduce a new API libxl__domain_restore() to load qemu state

2015-06-24 Thread Yang Hongyang
e resuming secondary vm. Introduce a new API libxl__domain_restore() to do it. This API should be called before resuming secondary vm. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang Cc: Anthony Perard --- tools/libxl/libxl_dom_save.c | 49 t

  1   2   3   4   5   >