Re: [Xen-devel] [Qemu-devel] [PATCH trivial] xen/Makefile.objs: simplify

2015-12-29 Thread Stefan Weil
Am 29.12.2015 um 11:13 schrieb Cao jin: > merge three lines into one line > > Signed-off-by: Cao jin > --- > hw/xen/Makefile.objs | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/hw/xen/Makefile.objs b/hw/xen/Makefile.objs > index a9ad7e7..77806f0 100644 > --- a/hw/xen/

Re: [Xen-devel] [PATCH] x86/vmx: Fix injection of #DB traps following XSA-165

2015-12-29 Thread Andrew Cooper
On 25/12/2015 01:36, Tian, Kevin wrote: From: Andrew Cooper [mailto:andrew.coop...@citrix.com] Sent: Friday, December 25, 2015 2:23 AM Most debug exceptions are traps rather than faults. Blindly re-injecting them as hardware exception causes the instruction pointer in the exception frame to poi

Re: [Xen-devel] question about migration

2015-12-29 Thread Andrew Cooper
On 25/12/2015 00:55, Wen Congyang wrote: On 12/24/2015 08:36 PM, Andrew Cooper wrote: On 24/12/15 02:29, Wen Congyang wrote: Hi Andrew Cooper: I rebase the COLO codes to the newest upstream xen, and test it. I found a problem in the test, and I can reproduce this problem via the migration.

Re: [Xen-devel] question about migration

2015-12-29 Thread Andrew Cooper
On 25/12/2015 01:45, Wen Congyang wrote: On 12/24/2015 08:36 PM, Andrew Cooper wrote: On 24/12/15 02:29, Wen Congyang wrote: Hi Andrew Cooper: I rebase the COLO codes to the newest upstream xen, and test it. I found a problem in the test, and I can reproduce this problem via the migration. Ho

[Xen-devel] [PATCH 2/2] pc-nvdimm acpi: build ACPI tables for pc-nvdimm devices

2015-12-29 Thread Haozhong Zhang
Reuse existing NVDIMM ACPI code to build ACPI tables for pc-nvdimm devices. The resulting tables are then copied into Xen guest domain so tha they can be later loaded by Xen hvmloader. Signed-off-by: Haozhong Zhang --- hw/acpi/nvdimm.c | 5 +++- hw/i386/pc.c | 6 - include/hw/x

[Xen-devel] [PATCH 1/2] pc-nvdimm: implement pc-nvdimm device abstract

2015-12-29 Thread Haozhong Zhang
The current implementation of vNVDIMM is based on pc-dimm and uses memory-backend device to allocate memory, which is not compatible with Xen ("-mem-path not supported with Xen" in qemu_ram_alloc_file()). This patch adds another pc-nvdimm device that does not rely on pc-dimm and allocates memory by

[Xen-devel] [PATCH 0/4] add support for vNVDIMM

2015-12-29 Thread Haozhong Zhang
This patch series is the Xen part patch to provide virtual NVDIMM to guest. The corresponding QEMU patch series is sent separately with the title "[PATCH 0/2] add vNVDIMM support for Xen". * Background NVDIMM (Non-Volatile Dual In-line Memory Module) is going to be supported on Intel's platform

[Xen-devel] [PATCH 1/4] x86/hvm: allow guest to use clflushopt and clwb

2015-12-29 Thread Haozhong Zhang
Pass CPU features CLFLUSHOPT and CLWB into HVM domain so that those two instructions can be used by guest. The specification of above two instructions can be found in https://software.intel.com/sites/default/files/managed/0d/53/319433-022.pdf Signed-off-by: Haozhong Zhang --- tools/libxc/xc_cpu

[Xen-devel] [PATCH 3/4] tools/xl: add a new xl configuration 'nvdimm'

2015-12-29 Thread Haozhong Zhang
This configure is used to specify vNVDIMM devices which are provided to the guest. xl parses this configuration and passes the result to qemu that is responsible to create vNVDIMM devices. Signed-off-by: Haozhong Zhang --- docs/man/xl.cfg.pod.5 | 19 +++ tools/libxl/libxl_d

[Xen-devel] [PATCH 2/4] x86/hvm: add support for pcommit instruction

2015-12-29 Thread Haozhong Zhang
Pass PCOMMIT CPU feature into HMV domain. Currently, we do not intercept pcommit instruction for L1 guest, and allow L1 to intercept pcommit instruction for L2 guest. The specification of pcommit instruction can be found in https://software.intel.com/sites/default/files/managed/0d/53/319433-022.pd

[Xen-devel] [PATCH 0/2] add vNVDIMM support for Xen

2015-12-29 Thread Haozhong Zhang
This patch series extends current vNVDIMM implementation to provide vNVDIMM to HVM domains when QEMU is used as the device model of Xen. This patch series is based on upstream qemu rather of qemu-xen, because vNVDIMM support has not been in qemu-xen (commit f165e58). * Following two problem that

[Xen-devel] [PATCH 4/4] hvmloader: add support to load extra ACPI tables from qemu

2015-12-29 Thread Haozhong Zhang
NVDIMM devices are detected and configured by software through ACPI. Currently, QEMU maintains ACPI tables of vNVDIMM devices. This patch extends the existing mechanism in hvmloader of loading passthrough ACPI tables to load extra ACPI tables built by QEMU. Signed-off-by: Haozhong Zhang --- tool

[Xen-devel] [distros-debian-snapshot test] 38570: regressions - FAIL

2015-12-29 Thread Platform Team regression test user
flight 38570 distros-debian-snapshot real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/38570/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-amd64-weekly-netinst-pygrub 9 debian-di-install fail REGR. vs. 3855

Re: [Xen-devel] [PATCH v3 07/62] arm/acpi: Add arch_acpi_os_map_memory helper function for ARM

2015-12-29 Thread Shannon Zhao
Hi, On 2015/12/7 20:02, Julien Grall wrote: > On 07/12/15 10:38, Ian Campbell wrote: >> On Mon, 2015-12-07 at 03:32 -0700, Jan Beulich wrote: >> On 07.12.15 at 09:58, wrote: On 2015/11/30 22:47, Julien Grall wrote: > On 23/11/15 11:37, Stefano Stabellini wrote: >>> On Tue, 17 Nov

Re: [Xen-devel] [PATCH trivial v2] xen/Makefile.objs: simplify

2015-12-29 Thread Stefan Weil
Am 29.12.2015 um 13:39 schrieb Cao jin: > merge last two lines, keep alphabetic order. > > Signed-off-by: Cao jin > --- > hw/xen/Makefile.objs | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/hw/xen/Makefile.objs b/hw/xen/Makefile.objs > index a9ad7e7..d367094 100644 >

Re: [Xen-devel] question about migration

2015-12-29 Thread Andrew Cooper
On 25/12/2015 03:06, Wen Congyang wrote: On 12/25/2015 09:45 AM, Wen Congyang wrote: On 12/24/2015 08:36 PM, Andrew Cooper wrote: On 24/12/15 02:29, Wen Congyang wrote: Hi Andrew Cooper: I rebase the COLO codes to the newest upstream xen, and test it. I found a problem in the test, and I can

Re: [Xen-devel] [PATCH RFC 1/3] x86/pvclock: add setter for pvclock_pvti_cpu0_va

2015-12-29 Thread Joao Martins
On 12/28/2015 11:45 PM, Andy Lutomirski wrote: > On Mon, Dec 28, 2015 at 1:52 PM, Joao Martins > wrote: >> Right now there is only a pvclock_pvti_cpu0_va() which is defined on >> kvmclock since: >> >> commit dac16fba6fc5 >> ("x86/vdso: Get pvclock data from the vvar VMA instead of the fixmap") >>

Re: [Xen-devel] [PATCH RFC 1/3] x86/pvclock: add setter for pvclock_pvti_cpu0_va

2015-12-29 Thread Andy Lutomirski
On Tue, Dec 29, 2015 at 4:50 AM, Joao Martins wrote: > On 12/28/2015 11:45 PM, Andy Lutomirski wrote: >> On Mon, Dec 28, 2015 at 1:52 PM, Joao Martins >> wrote: >>> Right now there is only a pvclock_pvti_cpu0_va() which is defined on >>> kvmclock since: >>> >>> commit dac16fba6fc5 >>> ("x86/vdso

Re: [Xen-devel] Debugging console

2015-12-29 Thread Andrew Cooper
On 28/12/2015 16:30, Carl Patenaude Poulin wrote: Hi all, We've got __HYPERVISOR_console_io working on our unikernel! The only issue is that it prints to `xl dmesg`. Is there a way to get it to print to `xl console`? No. They are two very different consoles. `xl dmesg` reads the hypervisor c

[Xen-devel] Booth and Demos at FOSDEM

2015-12-29 Thread Lars Kurth
Folks, we have a booth at FOSDEM again. As in the past, if anyone wants to give any demos, do let me know (with a proposal and a bit of text). The requirement is that the demos are related to the Xen Project. Best Regards Lars ___ Xen-devel mailing list

Re: [Xen-devel] [PATCH RFC 0/6] x86/time: PVCLOCK_TSC_STABLE_BIT support

2015-12-29 Thread Andrew Cooper
On 28/12/2015 16:59, Joao Martins wrote: Hey! I've been working on pvclock vdso support on Linux guests, and came across Xen lacking support for PVCLOCK_TSC_STABLE_BIT flag which is required for vdso as of the latest pvclock ABI shared with KVM. , and originally borrowed from Xen. Please be a

Re: [Xen-devel] [PATCH RFC 2/6] x86/time: implement tsc as clocksource

2015-12-29 Thread Andrew Cooper
On 28/12/2015 16:59, Joao Martins wrote: Introduce support for using TSC as platform time which is the highest resolution time and most performant to get (~20 nsecs). Though there are also several problems associated with its usage, and there isn't a complete (and architecturally defined) guaran

Re: [Xen-devel] [PATCH 0/2] add vNVDIMM support for Xen

2015-12-29 Thread Xiao Guangrong
On 12/29/2015 07:28 PM, Haozhong Zhang wrote: This patch series extends current vNVDIMM implementation to provide vNVDIMM to HVM domains when QEMU is used as the device model of Xen. This patch series is based on upstream qemu rather of qemu-xen, because vNVDIMM support has not been in qemu-xe

Re: [Xen-devel] [PATCH 1/4] x86/hvm: allow guest to use clflushopt and clwb

2015-12-29 Thread Andrew Cooper
On 29/12/2015 11:31, Haozhong Zhang wrote: Pass CPU features CLFLUSHOPT and CLWB into HVM domain so that those two instructions can be used by guest. The specification of above two instructions can be found in https://software.intel.com/sites/default/files/managed/0d/53/319433-022.pdf Signed-of

Re: [Xen-devel] [PATCH RFC 2/6] x86/time: implement tsc as clocksource

2015-12-29 Thread Joao Martins
On 12/29/2015 03:11 PM, Andrew Cooper wrote: > On 28/12/2015 16:59, Joao Martins wrote: >> Introduce support for using TSC as platform time which is the highest >> resolution time and most performant to get (~20 nsecs). Though there >> are also several problems associated with its usage, and there

Re: [Xen-devel] [PATCH RFC 0/6] x86/time: PVCLOCK_TSC_STABLE_BIT support

2015-12-29 Thread Joao Martins
On 12/29/2015 02:58 PM, Andrew Cooper wrote: > On 28/12/2015 16:59, Joao Martins wrote: >> Hey! >> >> I've been working on pvclock vdso support on Linux guests, and came >> across Xen lacking support for PVCLOCK_TSC_STABLE_BIT flag which is >> required for vdso as of the latest pvclock ABI shared

Re: [Xen-devel] [PATCH v2 06/14] x86/time.c: Scale host TSC in pvclock properly

2015-12-29 Thread Joao Martins
On 12/10/2015 11:56 AM, Joao Martins wrote: > > > On 12/10/2015 12:23 AM, Haozhong Zhang wrote: >> On 12/08/15 14:21, Boris Ostrovsky wrote: >>> On 12/07/2015 08:52 PM, Haozhong Zhang wrote: On 12/07/15 13:14, Boris Ostrovsky wrote: > On 12/06/2015 03:58 PM, Haozhong Zhang wrote: >

Re: [Xen-devel] [PATCH v2 06/14] x86/time.c: Scale host TSC in pvclock properly

2015-12-29 Thread Haozhong Zhang
On 12/29/15 18:22, Joao Martins wrote: > > > On 12/10/2015 11:56 AM, Joao Martins wrote: > > > > > > On 12/10/2015 12:23 AM, Haozhong Zhang wrote: > >> On 12/08/15 14:21, Boris Ostrovsky wrote: > >>> On 12/07/2015 08:52 PM, Haozhong Zhang wrote: > On 12/07/15 13:14, Boris Ostrovsky wrote:

Re: [Xen-devel] [PATCH 1/4] x86/hvm: allow guest to use clflushopt and clwb

2015-12-29 Thread Haozhong Zhang
On 12/29/15 15:46, Andrew Cooper wrote: > On 29/12/2015 11:31, Haozhong Zhang wrote: > >Pass CPU features CLFLUSHOPT and CLWB into HVM domain so that those two > >instructions can be used by guest. > > > >The specification of above two instructions can be found in > >https://software.intel.com/site

[Xen-devel] [PATCH 1/5] remus: don't call stream_continue() when doing failover

2015-12-29 Thread Wen Congyang
stream_continue() is used for migration to read emulator xenstore data and emulator context. For remus, if we do failover, we have read it in the checkpoint cycle, and we only need to complete the stream. Signed-off-by: Wen Congyang --- tools/libxl/libxl_stream_read.c | 18 +- 1

[Xen-devel] [PATCH 0/5] migration/remus: bug fix and cleanup

2015-12-29 Thread Wen Congyang
Wen Congyang (5): remus: don't call stream_continue() when doing failover remus: don't write xenstore data if it fails tools/libxc: don't send end record if remus fails tools/libxl: remove unused function libxl__domain_save_device_model() Allow all user to create a file under the direct

[Xen-devel] [PATCH 2/5] remus: don't write xenstore data if it fails

2015-12-29 Thread Wen Congyang
Signed-off-by: Wen Congyang --- tools/libxl/libxl_stream_write.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_stream_write.c b/tools/libxl/libxl_stream_write.c index 80d9208..ee9c53a 100644 --- a/tools/libxl/libxl_stream_write.c +++ b/tools/libxl/l

[Xen-devel] [PATCH 5/5] Allow all user to create a file under the directory /var/lib/xen

2015-12-29 Thread Wen Congyang
We may use non-root user to run qemu, and the qemu needs to write save file to /var/lib/xen. So we should allow all user to create a file under the directory /var/lib/xen Signed-off-by: Wen Congyang --- tools/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/Make

[Xen-devel] [PATCH 3/5] tools/libxc: don't send end record if remus fails

2015-12-29 Thread Wen Congyang
Signed-off-by: Wen Congyang --- tools/libxc/xc_sr_save.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxc/xc_sr_save.c b/tools/libxc/xc_sr_save.c index cefcef5..76ebb34 100644 --- a/tools/libxc/xc_sr_save.c +++ b/tools/libxc/xc_sr_save.c @@ -790,7 +790,7 @@ static i

[Xen-devel] [PATCH 4/5] tools/libxl: remove unused function libxl__domain_save_device_model()

2015-12-29 Thread Wen Congyang
Signed-off-by: Wen Congyang --- tools/libxl/libxl_dom.c | 91 tools/libxl/libxl_internal.h | 3 -- 2 files changed, 94 deletions(-) diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c index 47971a9..2269998 100644 --- a/tools/libxl/li

Re: [Xen-devel] [PATCH 1/4] x86/hvm: allow guest to use clflushopt and clwb

2015-12-29 Thread Haozhong Zhang
On 12/30/15 09:35, Haozhong Zhang wrote: > On 12/29/15 15:46, Andrew Cooper wrote: > > On 29/12/2015 11:31, Haozhong Zhang wrote: > > >Pass CPU features CLFLUSHOPT and CLWB into HVM domain so that those two > > >instructions can be used by guest. > > > > > >The specification of above two instructio

[Xen-devel] [PATCH v6 01/18] libxl/remus: init checkpoint_callback in Remus setup callback

2015-12-29 Thread Wen Congyang
init stream {read/write} state checkpoint_callback in Remus setup callback. There's no functional change, it's just refactoring so that we can move all remus code into one file. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang CC: Andrew Cooper CC: Ian Campbell CC: Ian Jackson CC: Wei

[Xen-devel] [PATCH v6 03/18] tools/libxl: move save/restore code into libxl_dom_save.c

2015-12-29 Thread Wen Congyang
This is purely code motion. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang CC: Ian Jackson CC: Wei Liu Acked-by: Ian Campbell --- tools/libxl/Makefile | 2 +- tools/libxl/libxl_dom.c | 514 tools/libxl/libxl_dom_save.c | 543 +

[Xen-devel] [PATCH v6 00/18] Prerequisite patches for COLO

2015-12-29 Thread Wen Congyang
This patchset is Prerequisite for COLO feature. Refer to: http://wiki.xen.org/wiki/COLO_-_Coarse_Grain_Lock_Stepping It was based on the following series: http://lists.xenproject.org/archives/html/xen-devel/2015-12/msg02881.html v5->v6: - Fix some bugs found in the test v4->v5: - Rebased to th

[Xen-devel] [PATCH v6 05/18] tools/libxc: support to resume uncooperative HVM guests

2015-12-29 Thread Wen Congyang
Befor this patch: 1. suspend a. PVHVM and PV: we use the same way to suspend the guest (send the suspend request to the guest). If the guest doesn't support evtchn, the xenstore variant will be used, suspending the guest via XenBus control node. b. pure HVM: we call xc_domain_shutdown(..., SH

[Xen-devel] [PATCH v6 02/18] tools/libxl: move remus code into libxl_remus.c

2015-12-29 Thread Wen Congyang
After previous refactoring, we are now able to move all remus code into a separate file libxl_remus.c. Export following functions for internal use: - Remus callbacks * libxl__remus_domain_suspend_callback * libxl__remus_domain_resume_callback * libxl__remus_domain_save_checkpoint_callback

[Xen-devel] [PATCH v6 04/18] libxl/save: Refactor libxl__domain_suspend_state

2015-12-29 Thread Wen Congyang
Currently struct libxl__domain_suspend_state contains 2 type of states, one is save state, another is suspend state. This patch separates those two out. The motivation of this is that COLO will need to do suspend/resume continuously, we need a more common suspend state. After this change, dss stan

[Xen-devel] [PATCH v6 10/18] tools/libxl: export logdirty_init

2015-12-29 Thread Wen Congyang
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 Signed-off-by: Wen Congyang Acked-by: Ian Campbell --- tools/libxl/libxl_dom_save.c | 4 ++-- tools/libxl/libxl_internal.h | 2 ++ 2 files chang

[Xen-devel] [PATCH v6 09/18] tools/libxl: introduce libxl__domain_common_switch_qemu_logdirty()

2015-12-29 Thread Wen Congyang
Secondary vm is running in colo mode, we need to send secondary vm's dirty page information to master at checkpoint, so we have to enable qemu logdirty on secondary. libxl__domain_suspend_common_switch_qemu_logdirty() is to enable qemu logdirty. But it uses domain_save_state, and calls libxl__xc_d

[Xen-devel] [PATCH v6 08/18] tools/libxl: introduce libxl__domain_restore_device_model to load qemu state

2015-12-29 Thread Wen Congyang
In normal migration, the qemu state was passed to qemu as a parameter. With COLO, Secondary vm is running. So we will do the following steps at every checkpoint: 1. suspend both primary vm and secondary vm 2. sync the state 3. resume both primary vm and secondary vm Primary will send qemu's state i

[Xen-devel] [PATCH v6 13/18] tools/libxl: rename remus device to checkpoint device

2015-12-29 Thread Wen Congyang
This patch is auto generated by the following commands: 1. git mv tools/libxl/libxl_remus_device.c tools/libxl/libxl_checkpoint_device.c 2. perl -pi -e 's/libxl_remus_device/libxl_checkpoint_device/g' tools/libxl/Makefile 3. perl -pi -e 's/\blibxl__remus_devices/libxl__checkpoint_devices/g' t

[Xen-devel] [PATCH v6 17/18] tools/libxl: move remus state into a seperate structure

2015-12-29 Thread Wen Congyang
Add a new structure remus state, and move concrete layer's private member to remus state. it is pure refactoring and no functional changes. Init interval in libxl__remus_setup(). It is safe to move this initialisation, because this value is only used for remus, and remus will use this value after l

[Xen-devel] [PATCH v6 15/18] tools/libxl: adjust the indentation

2015-12-29 Thread Wen Congyang
This is just tidying up after the previous automatic renaming. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang Acked-by: Ian Campbell --- tools/libxl/libxl_checkpoint_device.c | 21 +++-- tools/libxl/libxl_internal.h | 19 +++ 2 files changed,

[Xen-devel] [PATCH v6 07/18] migration/save: pass checkpointed_stream from libxl to libxc

2015-12-29 Thread Wen Congyang
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 Signed-off-by: Wen Congyang CC: Ian Campbell CC: Ian Jackson CC: Wei Liu CC: Andrew Cooper --- tools/libxc/include/xenguest.h | 6 +++

[Xen-devel] [PATCH v6 16/18] tools/libxl: store remus_ops in checkpoint device state

2015-12-29 Thread Wen Congyang
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. This patch and the following 2 will seperate remus from checkpoint device layer. We use remus ops directly in checkpoint device. S

[Xen-devel] [PATCH v6 11/18] tools/libxl: Add back channel to allow migration target send data back

2015-12-29 Thread 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. Extend libxl_domain_create_restore API, add a send_fd param to it. Add LIBXL_HAVE_CREATE_RESTORE_SE

[Xen-devel] [PATCH v6 12/18] tools/libx{l, c}: add back channel to libxc

2015-12-29 Thread Wen Congyang
In COLO mode, both VMs are running, and are considered in sync if the visible network traffic is identical. After some time, they fall out of sync. At this point, the two VMs have definitely diverged. Lets call the primary dirty bitmap set A, while the secondary dirty bitmap set B. Sets A and B

[Xen-devel] [PATCH v6 14/18] tools/libxl: fix backword compatibility after the automatic renaming

2015-12-29 Thread Wen Congyang
The error code ERROR_REMUS_XXX was introduced in Xen 4.5, and changed to ERROR_CHECKPOINT_XXX after previous renaming. The patch fix the backword compatibility. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang --- tools/libxl/libxl.h | 13 + 1 file changed, 13 insertions(+)

[Xen-devel] [PATCH v6 06/18] tools/libxl: introduce enum type libxl_checkpointed_stream

2015-12-29 Thread Wen Congyang
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. NOTE: libxl_domain_restore_params isn't changed here, checkpointed_stream is still an int. Signed-off-by: Yang Hong

[Xen-devel] [PATCH v6 18/18] tools/libxl: seperate device init/cleanup from checkpoint device layer

2015-12-29 Thread Wen Congyang
we call (init|cleanup)_subkind_nic and (init|cleanup)_subkind_drbd_disk directly in checkpoint device. Move them to libxl_remus.c, Call them before calling libxl__checkpoint_devices_setup() or after calling libxl__checkpoint_devices_teardown(). it is pure refactoring and no functional changes. Sig

[Xen-devel] [PATCH v9 09/25] tools/libx{l, c}: introduce should_checkpoint callback

2015-12-29 Thread Wen Congyang
Under COLO, we are doing checkpoint on demand, if this callback returns 1, we will take another checkpoint. 0 indicates unexpected error. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang --- tools/libxc/include/xenguest.h | 18 ++ tools/libxl/libxl_save_msgs_gen.pl |

[Xen-devel] [PATCH v9 04/25] libxc/migration: export read_record for common use

2015-12-29 Thread Wen Congyang
read_record() could be used by primary to read dirty bitmap record sent by secondary under COLO. When used by save side, we need to pass the backchannel fd instead of ctx->fd to read_record(), so we added a fd param to it. Signed-off-by: Yang Hongyang CC: Andrew Cooper Signed-off-by: Wen Congyan

[Xen-devel] [PATCH v9 12/25] primary vm suspend/resume/checkpoint code

2015-12-29 Thread Wen Congyang
We will do the following things again and again: 1. Suspend primary vm a. Suspend primary vm b. do postsuspend c. Read CHECKPOINT_SVM_SUSPENDED sent by secondary 2. Resume primary vm a. Read CHECKPOINT_SVM_READY from slave b. Do presume c. Resume primary vm d. Read CHECKPOINT_S

[Xen-devel] [PATCH v9 15/25] send store gfn and console gfn to xl before resuming secondary vm

2015-12-29 Thread Wen Congyang
We will call libxl__xc_domain_restore_done() to rebuild secondary vm. But we need store gfn and console gfn when rebuilding secondary vm. So make restore_results a function pointer in callback struct and struct {save,restore}_callbacks, and use this callback to send store gfn and console gfn to xl.

[Xen-devel] [PATCH v9 11/25] secondary vm suspend/resume/checkpoint code

2015-12-29 Thread 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 CHECKPOINT_SVM_READY to master. b. If it is not the first resume, call libxl__checkpoint_devices_preresume(). c. If it is the first resume(resume right after live migrat

[Xen-devel] [PATCH v9 13/25] libxc/restore: support COLO restore

2015-12-29 Thread Wen Congyang
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 | 6 +++-- tools/libxc/xc_sr_restore.c | 60 +++

[Xen-devel] [PATCH v9 00/25] COarse-grain LOck-stepping Virtual Machines for Non-stop Service

2015-12-29 Thread Wen Congyang
This patchset implemented the COLO feature for Xen. For detail/install/use of COLO feature, refer to: http://wiki.xen.org/wiki/COLO_-_Coarse_Grain_Lock_Stepping This patchset is based on: 1. http://lists.xenproject.org/archives/html/xen-devel/2015-12/msg02881.html 2. http://lists.xenproject.org/

[Xen-devel] [PATCH v9 24/25] setup and control colo proxy on secondary side

2015-12-29 Thread Wen Congyang
setup and control colo proxy on secondary side Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang --- tools/libxl/libxl_colo_restore.c | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/tools/libxl/libxl_colo_restore.c b/tools/libxl/libxl_col

[Xen-devel] [PATCH v9 07/25] tools/libxl: add back channel support to read stream

2015-12-29 Thread Wen Congyang
This is used by primay to read records sent by secondary. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang --- tools/libxl/libxl_create.c | 1 + tools/libxl/libxl_internal.h| 1 + tools/libxl/libxl_stream_read.c | 27 +++ 3 files changed, 25 insertions

[Xen-devel] [PATCH v9 02/25] docs/libxl: Introduce COLO_CONTEXT to support migration v2 colo streams

2015-12-29 Thread Wen Congyang
It is the negotiation record for COLO. Primary->Secondary: control_id 0x: Secondary VM is out of sync, start a new checkpoint Secondary->Primary: 0x0001: Secondary VM is suspended 0x0002: Secondary VM is ready 0x0003: Secondar

[Xen-devel] [PATCH v9 01/25] docs: add colo readme

2015-12-29 Thread Wen Congyang
add colo readme, refer to http://wiki.xen.org/wiki/COLO_-_Coarse_Grain_Lock_Stepping Signed-off-by: Yang Hongyang Acked-by: Ian Campbell Signed-off-by: Wen Congyang --- docs/README.colo | 9 + 1 file changed, 9 insertions(+) create mode 100644 docs/README.colo diff --git a/docs/READM

[Xen-devel] [PATCH v9 18/25] Support colo mode for qemu disk

2015-12-29 Thread Wen Congyang
Usage: disk = ['...,colo,colo-host=xxx,colo-port=xxx,colo-export=xxx,active-disk=xxx,hidden-disk=xxx...'] For QEMU block replication details: http://wiki.qemu.org/Features/BlockReplication Signed-off-by: Wen Congyang Signed-off-by: Yang Hongyang --- docs/man/xl.pod.1 | 2 +-

[Xen-devel] [PATCH v9 06/25] tools/libxl: write checkpoint_state records into the stream

2015-12-29 Thread Wen Congyang
write checkpoint_state records into the stream, used by both primary and secondary to send colo context. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang --- tools/libxl/libxl_internal.h | 5 tools/libxl/libxl_stream_write.c | 60 +++- 2 fil

[Xen-devel] [PATCH v9 19/25] COLO: use qemu block replication

2015-12-29 Thread Wen Congyang
Use qemu block replication as our block replication solution. Note that guest must be paused before starting COLO, otherwise, the disk won't be consistent between primary and secondary. Signed-off-by: Wen Congyang for commit message, Signed-off-by: Yang Hongyang --- tools/libxl/Makefile

[Xen-devel] [PATCH v9 05/25] tools/libxl: add back channel support to write stream

2015-12-29 Thread Wen Congyang
Add back channel support to write stream. If the write stream is a back channel stream, this means the write stream is used by Secondary to send some records back. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang --- tools/libxl/libxl_dom_save.c | 1 + tools/libxl/libxl_internal.h

[Xen-devel] [PATCH v9 10/25] tools/libx{l, c}: add postcopy/suspend callback to restore side

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

[Xen-devel] [PATCH v9 21/25] COLO proxy: preresume, postresume and checkpoint

2015-12-29 Thread Wen Congyang
preresume, postresume and checkpoint Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang --- tools/libxl/libxl_colo.h | 4 +++ tools/libxl/libxl_colo_proxy.c | 62 ++ 2 files changed, 66 insertions(+) diff --git a/tools/libxl/libxl_colo.h b/t

[Xen-devel] [PATCH v9 17/25] implement the cmdline for COLO

2015-12-29 Thread 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-off-by: Wen Congyang

[Xen-devel] [PATCH v9 23/25] setup and control colo proxy on primary side

2015-12-29 Thread Wen Congyang
setup and control colo proxy on primary side Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang --- tools/libxl/libxl_colo_save.c | 124 +++--- tools/libxl/libxl_internal.h | 1 + 2 files changed, 117 insertions(+), 8 deletions(-) diff --git a/tools

[Xen-devel] [PATCH v9 14/25] libxc/restore: send dirty pfn list to primary when checkpoint under colo

2015-12-29 Thread Wen Congyang
Send dirty pfn list to primary when checkpoint under colo. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang --- tools/libxc/xc_sr_common.h | 4 ++ tools/libxc/xc_sr_restore.c | 120 +++- 2 files changed, 123 insertions(+), 1 deletion(-) diff -

[Xen-devel] [PATCH v9 08/25] tools/libxl: handle checkpoint_state records in a libxl migration v2 read stream

2015-12-29 Thread Wen Congyang
Read a checkpoint_state and call stream->checkpoint_callback to handle it. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang --- tools/libxl/libxl_internal.h| 3 +++ tools/libxl/libxl_stream_read.c | 57 - 2 files changed, 59 insertions(+), 1

[Xen-devel] [PATCH v9 25/25] cmdline switches and config vars to control colo-proxy

2015-12-29 Thread Wen Congyang
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-off-by: Yang Hongyang Sign

[Xen-devel] [PATCH v9 20/25] COLO proxy: implement setup/teardown of COLO proxy module

2015-12-29 Thread Wen Congyang
setup/teardown of COLO proxy module. we use netlink to communicate with proxy module. About colo-proxy module: https://lkml.org/lkml/2015/6/18/32 How to use: http://wiki.xen.org/wiki/COLO_-_Coarse_Grain_Lock_Stepping Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang --- tools/libxl/Makef

[Xen-devel] [PATCH v9 03/25] libxc/migration: Specification update for DIRTY_PFN_LIST records

2015-12-29 Thread Wen Congyang
Used by secondary to send it's dirty bitmap to primary under COLO. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang --- docs/specs/libxc-migration-stream.pandoc | 24 +++- tools/libxc/xc_sr_common.c | 1 + tools/libxc/xc_sr_stream_format.h| 1

[Xen-devel] [PATCH v9 16/25] libxc/save: support COLO save

2015-12-29 Thread Wen Congyang
After suspend primary vm, get dirty bitmap 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_common.h | 2 + tools/libxc/xc_sr_save.c | 102 +

[Xen-devel] [PATCH v9 22/25] COLO nic: implement COLO nic subkind

2015-12-29 Thread Wen Congyang
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 | 135 +++ tools/libxl/Makefile | 1 + tools/libxl/libxl_colo_nic.c | 321 +++

Re: [Xen-devel] [PATCH v3 20/62] arm/acpi: Add ACPI support for SMP initialization

2015-12-29 Thread Shannon Zhao
On 2015/11/30 22:57, Julien Grall wrote: > Hi Shannon, > > On 17/11/15 09:40, shannon.z...@linaro.org wrote: >> > diff --git a/xen/arch/arm/psci.c b/xen/arch/arm/psci.c >> > index d800cb6..dede0e1 100644 >> > --- a/xen/arch/arm/psci.c >> > +++ b/xen/arch/arm/psci.c >> > @@ -22,6 +22,7 @@ >> > #

Re: [Xen-devel] [PATCH RFC 0/6] x86/time: PVCLOCK_TSC_STABLE_BIT support

2015-12-29 Thread Haozhong Zhang
On 12/29/15 14:58, Andrew Cooper wrote: > On 28/12/2015 16:59, Joao Martins wrote: > >Hey! > > > >I've been working on pvclock vdso support on Linux guests, and came > >across Xen lacking support for PVCLOCK_TSC_STABLE_BIT flag which is > >required for vdso as of the latest pvclock ABI shared with

Re: [Xen-devel] [PATCH 5/5] Allow all user to create a file under the directory /var/lib/xen

2015-12-29 Thread Doug Goldstein
On 12/29/15 8:39 PM, Wen Congyang wrote: > We may use non-root user to run qemu, and the qemu needs to write > save file to /var/lib/xen. So we should allow all user to create > a file under the directory /var/lib/xen > > Signed-off-by: Wen Congyang > --- > tools/Makefile | 2 +- > 1 file change

Re: [Xen-devel] [PATCH 5/5] Allow all user to create a file under the directory /var/lib/xen

2015-12-29 Thread Wen Congyang
On 12/30/2015 12:11 PM, Doug Goldstein wrote: > On 12/29/15 8:39 PM, Wen Congyang wrote: >> We may use non-root user to run qemu, and the qemu needs to write >> save file to /var/lib/xen. So we should allow all user to create >> a file under the directory /var/lib/xen >> >> Signed-off-by: Wen Congy