[Xen-devel] [RFC PATCH COLO v5 29/29] cmdline switches and config vars to control colo-proxy

2015-03-31 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-off-by: Yang Hongyang Sign

[Xen-devel] [RFC PATCH COLO v5 27/29] setup and control colo proxy on primary side

2015-03-31 Thread Yang Hongyang
setup and control colo proxy on primary side Signed-off-by: Yang Hongyang --- tools/libxl/libxl_colo_save.c | 124 +++--- tools/libxl/libxl_internal.h | 4 ++ 2 files changed, 120 insertions(+), 8 deletions(-) diff --git a/tools/libxl/libxl_colo_save.c b/t

[Xen-devel] [RFC PATCH COLO v5 25/29] COLO proxy: preresume, postresume and checkpoint

2015-03-31 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 index

[Xen-devel] [RFC PATCH COLO v5 28/29] setup and control colo proxy on secondary side

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

[Xen-devel] [RFC PATCH COLO v5 26/29] COLO nic: implement COLO nic subkind

2015-03-31 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 | 128 ++ tools/libxl/Makefile | 1 + tools/libxl/libxl_colo_nic.c | 313

[Xen-devel] [RFC PATCH COLO v5 23/29] COLO: use qemu block replication

2015-03-31 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] [RFC PATCH COLO v5 24/29] COLO proxy: implement setup/teardown of COLO proxy module

2015-03-31 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/libxl

[Xen-devel] [RFC PATCH COLO v5 22/29] Support colo mode for qemu disk

2015-03-31 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 | 42 ++- too

[Xen-devel] [RFC PATCH COLO v5 16/29] primary vm suspend/get_dirty_pfn/resume/checkpoint code

2015-03-31 Thread Yang Hongyang
From: Wen Congyang We will do the following things again and again: 1. Suspend primary vm a. Suspend primary vm b. do postsuspend c. Read LIBXL_COLO_SVM_SUSPENDED to master d. Read secondary vm's dirty page information to master(count + pfn list) 2. Get dirty pfn list a. Return sec

[Xen-devel] [RFC PATCH COLO v5 15/29] secondary vm suspend/resume/checkpoint code

2015-03-31 Thread Yang Hongyang
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 is not resumed the first time, call libxl__checkpoint_devices_preresume(). c. If it is resumed the first t

[Xen-devel] [RFC PATCH COLO v5 19/29] send store mfn and console mfn to xl before resuming secondary vm

2015-03-31 Thread Yang Hongyang
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 callbacks struct and struct {save,restore}_callbacks, and use this callback to send store

[Xen-devel] [RFC PATCH COLO v5 21/29] tools: xc_doamin_restore: zero ioreq page only one time

2015-03-31 Thread Yang Hongyang
From: Wen Congyang 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 ioreq->state is always STATE_IOREQ_NONE after the vm is suspended, so it

[Xen-devel] [RFC PATCH COLO v5 18/29] COLO: xc related codes

2015-03-31 Thread Yang Hongyang
From: Wen Congyang Save: 1. send XC_SAVE_ID_LAST_CHECKPOINT, so secondary vm can be resumed 2. call callbacks->get_dirty_pfn() after suspend primary vm if we are doing checkpoint. Restore: 1. call the callbacks resume/checkpoint/suspend if secondary vm's status is the same as primary vm's

[Xen-devel] [RFC PATCH COLO v5 14/29] Allow slave sends data to master

2015-03-31 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 --- tools/libxl/libxl.c | 2 +- tools

[Xen-devel] [RFC PATCH COLO v5 20/29] implement the cmdline for COLO

2015-03-31 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] [RFC PATCH COLO v5 17/29] xc_domain_save: flush cache before calling callbacks->postcopy() in colo mode

2015-03-31 Thread Yang Hongyang
From: Wen Congyang In colo mode, secondary vm is running. We will use the io_fd to ensure that both primary vm and secondary vm are resumed at the same time. So we should call postcopy later. Signed-off-by: Wen Congyang --- tools/libxc/xc_domain_save.c | 16 ++-- 1 file changed, 14

[Xen-devel] [RFC PATCH COLO v5 11/29] adjust the indentation

2015-03-31 Thread Yang Hongyang
From: Wen Congyang Signed-off-by: Wen Congyang --- tools/libxl/libxl_checkpoint_device.c | 23 --- tools/libxl/libxl_internal.h | 21 - tools/libxl/libxl_remus.c | 12 3 files changed, 32 insertions(+), 24 deletions(-) d

[Xen-devel] [RFC PATCH COLO v5 10/29] rename remus device to checkpoint device

2015-03-31 Thread Yang Hongyang
From: 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__che

[Xen-devel] [RFC PATCH COLO v5 12/29] don't touch remus in checkpoint_device

2015-03-31 Thread Yang Hongyang
From: 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: 1. remus_ops: we use remus ops directly in checkpoint device. Store it in checkpoint device state. 2. concre

[Xen-devel] [RFC PATCH COLO v5 13/29] Update libxl_save_msgs_gen.pl to support return data from xl to xc

2015-03-31 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] [RFC PATCH COLO v5 09/29] move remus related codes to libxl_remus.c

2015-03-31 Thread Yang Hongyang
From: Wen Congyang libxl_domain_remus_start() is external API, and is not moved. Signed-off-by: Wen Congyang Cc: Shriram Rajagopalan --- tools/libxl/Makefile | 2 +- tools/libxl/libxl.c | 57 + tools/libxl/libxl_dom.c | 220 +--- tools/libxl

[Xen-devel] [RFC PATCH COLO v5 03/29] tools: libxl: introduce a new API libxl__domain_restore() to read qemu state

2015-03-31 Thread Yang Hongyang
From: Wen Congyang 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 We will send qemu's state each time in step2, and slave's qemu should read it each t

[Xen-devel] [RFC PATCH COLO v5 08/29] tools/libxl: Introduce bitops macros

2015-03-31 Thread Yang Hongyang
From: Wen Congyang This is the same set used by libxc. Signed-off-by: Wen Congyang --- tools/libxl/libxl_bitops.h | 79 ++ 1 file changed, 79 insertions(+) create mode 100644 tools/libxl/libxl_bitops.h diff --git a/tools/libxl/libxl_bitops.h b/tool

[Xen-devel] [RFC PATCH COLO v5 06/29] Update libxl__domain_unpause() to support qemu-xen

2015-03-31 Thread Yang Hongyang
From: Wen Congyang Currently, libxl__domain_unpause() only supports qemu-xen-traditional. Update it to support qemu-xen. Signed-off-by: Wen Congyang --- tools/libxl/libxl.c | 13 + tools/libxl/libxl_dom.c | 25 + tools/libxl/libxl_internal.h |

[Xen-devel] [RFC PATCH COLO v5 04/29] Update libxl__domain_suspend_common_switch_qemu_logdirty() for colo

2015-03-31 Thread Yang Hongyang
From: Wen Congyang Secondary vm is running in colo mode. So we need to send secondary vm's dirty page information to master. libxl__domain_suspend_common_switch_qemu_logdirty() is to enable qemu logdirty. But it uses domain_suspend_state, and calls libxl__xc_domain_saverestore_async_callback_done

[Xen-devel] [RFC PATCH COLO v5 00/29] COarse-grain LOck-stepping Virtual Machines for Non-stop Service

2015-03-31 Thread Yang Hongyang
This patchset is for xen-4.6. The main diffrence from previous versions are: 1. Use qdisk block replication http://wiki.qemu.org/Features/BlockReplication 2. Nic replication based on colo-proxy http://wiki.qemu.org/Features/COLO#Components Note that COLO feature is under active development, t

[Xen-devel] [RFC PATCH COLO v5 01/29] Add readme

2015-03-31 Thread Yang Hongyang
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: Yang Hongyang --- docs/README.colo | 92 1 file changed, 92 insertions(+) create mode 100644 docs/README.colo diff --git a/docs/README.colo b/docs/README.colo new file mode

[Xen-devel] [RFC PATCH COLO v5 07/29] support to resume uncooperative HVM guests

2015-03-31 Thread Yang Hongyang
From: Wen Congyang For PVHVM, the hypercall return code is 0, and it can be resumed in a new domain context. For HVM, do nothing. Signed-off-by: Wen Congyang --- tools/libxc/xc_resume.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/tools/libxc/xc_re

[Xen-devel] [RFC PATCH COLO v5 05/29] Introduce a new internal API libxl__domain_unpause()

2015-03-31 Thread Yang Hongyang
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 not an internal API. Introduce a new API to support it. Signed-off-by: Wen Congyang --- tools/libxl/libxl

[Xen-devel] [RFC PATCH COLO v5 02/29] Refactor domain_suspend_callback_common()

2015-03-31 Thread Yang Hongyang
From: Wen Congyang libxl__domain_suspend() is to save the guest. I think we should call it libxl__domain_save(), but I don't rename it. 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

Re: [Xen-devel] [PATCH] xen-blkback: define pr_fmt macro to avoid the duplication of DRV_PFX

2015-03-31 Thread Chentao (Boby)
Thanks roger and joe. I will adopt your suggestions in my v2 patch. On 2015/3/31 22:57, Roger Pau Monné wrote: El 31/03/15 a les 23.14, Tao Chen ha escrit: Define pr_fmt macro with {xen-blkback: } prefix, then remove all use of DRV_PFX in the pr and DPRINTK sentences. It will simplify the code

[Xen-devel] [qemu-upstream-4.4-testing test] 50274: tolerable FAIL - PUSHED

2015-03-31 Thread osstest service user
flight 50274 qemu-upstream-4.4-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/50274/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-i386-pair 17 guest-migrate/src_host/dst_host fail pass in 36769 test-amd64-i386-xl-wi

Re: [Xen-devel] [OSSTEST Nested PATCH v7 2/6] Edit some testsupport APIs for nested test

2015-03-31 Thread Pang, LongtaoX
> -Original Message- > From: Ian Campbell [mailto:ian.campb...@citrix.com] > Sent: Tuesday, March 31, 2015 9:50 PM > To: Pang, LongtaoX > Cc: xen-devel@lists.xen.org; ian.jack...@eu.citrix.com; wei.l...@citrix.com; > Hu, Robert > Subject: Re: [OSSTEST Nested PATCH v7 2/6] Edit some testsu

[Xen-devel] [xen-unstable bisection] complete test-amd64-amd64-xl-multivcpu

2015-03-31 Thread xen . org
branch xen-unstable xen branch xen-unstable job test-amd64-amd64-xl-multivcpu test guest-localmigrate Tree: linux git://xenbits.xen.org/linux-pvops.git Tree: linuxfirmware git://xenbits.xen.org/osstest/linux-firmware.git Tree: qemu git://xenbits.xen.org/staging/qemu-xen-unstable.git Tree: qemuu gi

[Xen-devel] [xen-unstable test] 50273: regressions - FAIL

2015-03-31 Thread osstest service user
flight 50273 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/50273/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-freebsd10-i386 11 guest-localmigrate fail REGR. vs. 36514 Regressions which ar

Re: [Xen-devel] [OSSTEST Nested PATCH v7 1/6] parsing grub which has 'submenu' primitive

2015-03-31 Thread Hu, Robert
> -Original Message- > From: Ian Campbell [mailto:ian.campb...@citrix.com] > Sent: Tuesday, March 31, 2015 9:44 PM > To: Pang, LongtaoX > Cc: xen-devel@lists.xen.org; ian.jack...@eu.citrix.com; wei.l...@citrix.com; > Hu, Robert > Subject: Re: [OSSTEST Nested PATCH v7 1/6] parsing grub which

Re: [Xen-devel] [v3][PATCH 2/2] libxl: introduce gfx_passthru_kind

2015-03-31 Thread Chen, Tiejun
On 2015/3/30 17:19, Ian Campbell wrote: On Mon, 2015-03-30 at 09:28 +0800, Chen, Tiejun wrote: Sounds it should be a legacy fix to qemu-xen-tranditional :) So lets do it now, @@ -326,6 +326,10 @@ static char ** libxl__build_device_model_args_old(libxl__gc *gc, } if (libxl_

Re: [Xen-devel] Xen-unstable-staging: Xen BUG at iommu_map.c:455

2015-03-31 Thread Sander Eikelenboom
Wednesday, April 1, 2015, 1:38:34 AM, you wrote: > On 31/03/2015 22:11, Sander Eikelenboom wrote: >> Hi all, >> >> I just tested xen-unstable staging (changeset: git:0522407-dirty) >> >> with revert of commit 1aeb1156fa43fe2cd2b5003995b20466cd19a622 >> (due to an already reported but not yet res

Re: [Xen-devel] Xen-unstable-staging: Xen BUG at iommu_map.c:455

2015-03-31 Thread Andrew Cooper
On 31/03/2015 22:11, Sander Eikelenboom wrote: > Hi all, > > I just tested xen-unstable staging (changeset: git:0522407-dirty) > > with revert of commit 1aeb1156fa43fe2cd2b5003995b20466cd19a622 > (due to an already reported but not yet resolved issue) > > and build with qemu xen from > git://xenb

[Xen-devel] [qemu-mainline test] 50272: regressions - FAIL

2015-03-31 Thread osstest service user
flight 50272 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/50272/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-freebsd10-i386 14 guest-localmigrate/x10 fail REGR. vs. 36709 Regressions which a

Re: [Xen-devel] [PATCH RESEND 1/2] xenbus_client: Extend interface to support multi-page ring

2015-03-31 Thread Bob Liu
Hi Juergen, On 03/31/2015 08:36 PM, Juergen Gross wrote: > On 03/31/2015 02:15 PM, Bob Liu wrote: >> From: Wei Liu >> >> Originally Xen PV drivers only use single-page ring to pass along >> information. This might limit the throughput between frontend and >> backend. >> >> The patch extends Xenbu

[Xen-devel] Xen-unstable-staging: Xen BUG at iommu_map.c:455

2015-03-31 Thread Sander Eikelenboom
Hi all, I just tested xen-unstable staging (changeset: git:0522407-dirty) with revert of commit 1aeb1156fa43fe2cd2b5003995b20466cd19a622 (due to an already reported but not yet resolved issue) and build with qemu xen from git://xenbits.xen.org/staging/qemu-upstream-unstable.git (to include the

[Xen-devel] [linux-3.10 test] 50271: tolerable FAIL - PUSHED

2015-03-31 Thread osstest service user
flight 50271 linux-3.10 real [real] http://logs.test-lab.xenproject.org/osstest/logs/50271/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-amd64-i386-pair17 guest-migrate/src_host/dst_host fail like 26303 Tests which did not succeed, bu

[Xen-devel] [PATCH 13/28] libxl: domain create: Do not destroy on cancellation

2015-03-31 Thread Ian Jackson
If we cancelled the domain creation, do not try to tear it down again Document this. This is a backwards-compatible API change since old libxl users will never cancel any operations. In the current code, there is no functional change, because ERROR_CANCELLED is never generated anywhere yet. Sign

[Xen-devel] [PATCH 22/28] libxl: cancellation: Support cancellation where we spot domain death

2015-03-31 Thread Ian Jackson
Make an active libxl__domaindeathcheck contain an active libxl__ao_cancellable. Consequential changes are: * domaindeath callbacks now take an rc value. * libxl__domaindeathcheck_start takes an ao, not a gc. * bootloader_domaindeath plumbs the rc through to its caller. * libxl__domaindeathchec

[Xen-devel] [PATCH 25/28] libxl: cancellation: Handle SIGTERM in save/restore helper

2015-03-31 Thread Ian Jackson
During startup of the save/restore helper, set the disposition of SIGTERM appropriately. For restore, we can simply die immediately - there is no point trying to do any kind of cleanup on what is now going to be a trashed domain. For save, we want to arrange that libxc's cleanup code (eg turning

[Xen-devel] [PATCH 18/28] libxl: cancellation: Provide explicit internal cancel check API

2015-03-31 Thread Ian Jackson
Some places in libxl which can't handle cancellation via a libxl__ao_cancellable callback might nevertheless benefit from being able to explicitly check for cancellation. Provide the (fairly trivial) internal API function to do this. Signed-off-by: Ian Jackson Acked-by: Ian Campbell --- v2: Ne

[Xen-devel] [PATCH 23/28] libxl: Introduce FILLZERO

2015-03-31 Thread Ian Jackson
FILLZERO is a macro for memset(&foo,0,sizeof(foo)). It eliminates the possiblity to make the error memset(&foo,0,sizeof(&foo)). No callers yet, but document it in CODING_STYLE. (In accordance with existing libxl policy, I haven't gone through all existing possible call sites.) Signed-off-by: Ia

[Xen-devel] [PATCH 12/28] libxl: events: Permit timeouts to signal cancellation

2015-03-31 Thread Ian Jackson
The callback functions provided by users must take an rc value. This rc value can be ERROR_TIMEDOUT or ERROR_CANCELLED. Users of xswait are now expected to deal correctly with ERROR_CANCELLED. If they experience this, it hasn't been logged. And the caller won't log it either since it's not TIMED

[Xen-devel] [PATCH 19/28] libxl: cancellation: Make timeouts cancellable

2015-03-31 Thread Ian Jackson
Make libxl__ev_time* register with the cancellation machinery, so that libxl_ao_cancel can cancel any operation which has a timeout. Signed-off-by: Ian Jackson Acked-by: Ian Campbell --- tools/libxl/libxl_event.c| 27 +++ tools/libxl/libxl_internal.h |3 ++- 2

[Xen-devel] [PATCH 04/28] libxl: suspend: common suspend callbacks take rc

2015-03-31 Thread Ian Jackson
Change the following functions to take a libxl error code rather than a boolean "ok" value, and translate that value to the boolean expected by libxc at the last moment: domain_suspend_callback_common_done} dss->callback_common_done remus_domain_suspend_callback_common_done } domain_

[Xen-devel] [PATCH 28/28] libxl: cancellation: Make datacopiers cancellable

2015-03-31 Thread Ian Jackson
libxl__datacopier_* can now actually generate a callback with rc==CANCELLED. This provides cancellation during some corner cases, including (at least) copying the device model data during the end of domain save. Signed-off-by: Ian Jackson Acked-by: Ian Campbell --- v2: New in this version of th

[Xen-devel] [PATCH 14/28] libxl: ao: Record ultimate parent of a nested ao

2015-03-31 Thread Ian Jackson
This will be used by the cancellation machinery. Signed-off-by: Ian Jackson Acked-by: Ian Campbell --- tools/libxl/libxl_event.c| 25 +++-- tools/libxl/libxl_internal.h |3 ++- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/tools/libxl/libxl_event

[Xen-devel] [PATCH 26/28] libxl: cancellation: Cancel libxc save/restore

2015-03-31 Thread Ian Jackson
Register the the save/restore helper interface with the cancellation machinery. When we are informed that save/restore should be cancelled, we make a note of the that in our rc variable, and send the helper a SIGTERM. It will die in due course. Signed-off-by: Ian Jackson Acked-by: Ian Campbell

[Xen-devel] [PATCH 21/28] libxl: Introduce DOMAIN_DESTROYED error code

2015-03-31 Thread Ian Jackson
This is currently reported only by the bootloader code, if the domain is destroyed while the bootloader is running. In the future it would be nice to return it for other circumstances where the domain existed when the operation started but subsequently vanished. Signed-off-by: Ian Jackson Acked-

[Xen-devel] [PATCH 03/28] libxl: suspend: switch_logdirty_done takes rc

2015-03-31 Thread Ian Jackson
switch_logdirty_done used to take the value to pass to libxl__xc_domain_saverestore_async_callback_done (ie, the return value from the callback). (This was mistakenly described as "ok" in the prototype, but in the definition it is "broke" and all the call sites passed 0 for success or -1 for error

[Xen-devel] [PATCH 24/28] libxl: cancellation: Preparations for save/restore cancellation

2015-03-31 Thread Ian Jackson
Two unrelated non-functional changes, broken out into a pre-patch for easier review: Break out a function sendsig() in libxl_save_callout.c. Move io_fd to be a global variable in libxl_save_helper.c. Signed-off-by: Ian Jackson Acked-by: Ian Campbell --- v2: New in this version of the series. -

[Xen-devel] [PATCH 20/28] libxl: cancellation: Note that driver domain task cannot be usefully cancelled

2015-03-31 Thread Ian Jackson
In practice, cancelling this task will cause all subsequent actual backend operations to fail, but will not actually cause the libxl_device_events_handler operation to complete. Signed-off-by: Ian Jackson CC: Roger Pau Monné Acked-by: Roger Pau Monné Acked-by: Ian Campbell --- v2: New in this

[Xen-devel] [PATCH 15/28] libxl: ao: Count the nested progeny of an ao

2015-03-31 Thread Ian Jackson
This will detect any "escaped" nested aos. Signed-off-by: Ian Jackson Acked-by: Ian Campbell --- tools/libxl/libxl_event.c|8 +++- tools/libxl/libxl_internal.h |1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/libxl/libxl_event.c b/tools/libxl/libxl_event

[Xen-devel] [PATCH 27/28] libxl: ao: datacopier callback gets an rc

2015-03-31 Thread Ian Jackson
libxl__datacopier_* now provides its caller's callback function with an rc value. This relieves the caller of the need to figure out an appropriate rc value. Arrange that the `other internal failure' cases now get a valid positive errno value (EIO). In a few places, assert that errno is nonzero

[Xen-devel] [PATCH 11/28] libxl: events: Make libxl__async_exec_* pass caller an rc

2015-03-31 Thread Ian Jackson
The internal user of libxl__async_exec_start et al now gets an rc as well as the process's exit status. For now this is always either 0 or ERROR_FAIL, but with ao cancellation this will possibly be CANCELLED or TIMEDOUT too. Signed-off-by: Ian Jackson --- v2: New patch due to rebause; v1 had cha

[Xen-devel] [PATCH 17/28] libxl: cancellation: Provide public ao cancellation API

2015-03-31 Thread Ian Jackson
Provide libxl_ao_cancel. There is machinery to allow an ao to register an interest in its cancellation, using a libxl__ao_cancellable. This API is not currently very functional: attempting cancellation it will always return NOTIMPLEMENTED and have no effect. Signed-off-by: Ian Jackson Acked-by:

[Xen-devel] [PATCH 16/28] libxl: ao: Provide manip_refcnt

2015-03-31 Thread Ian Jackson
Previously we used in_initiator to stop the ao being freed while we were still in the initiator function (which would result in the initiator's call to lixl__ao_inprogress accessing the ao after it had been freed). We are going to introduce a new libxl entrypoint which finds, and operates on, ongo

[Xen-devel] [PATCH 09/28] libxl: New error codes CANCELLED etc.

2015-03-31 Thread Ian Jackson
We introduce ERROR_CANCELLED now, so that we can write code to handle it, and decreee that functions might return it, even though currently there is nowhere where this error is generated. While we're here, provide ERROR_NOTFOUND and ERROR_NOTIMPLEMENTED, which will also be used later, but only as

[Xen-devel] [PATCH 10/28] libxl: events: Make timeout and async exec setup take an ao, not a gc

2015-03-31 Thread Ian Jackson
Change the timeout setup functions to take a libxl__ao, not a libxl__gc. This is going to be needed for ao cancellation, because timeouts are going to be a main hook for ao cancellation - so the timeouts need to be associated with an ao. This means that timeouts can only occur as part of a long-r

[Xen-devel] [PATCH 07/28] libxl: xswait/devstate: Move xswait to before devstate

2015-03-31 Thread Ian Jackson
Pure code motion. We are going to make devstate use xswait. Signed-off-by: Ian Jackson Acked-by: Ian Campbell --- tools/libxl/libxl_internal.h | 109 +- 1 file changed, 55 insertions(+), 54 deletions(-) diff --git a/tools/libxl/libxl_internal.h b/tools

[Xen-devel] [PATCH 02/28] libxl: Comment cleanups

2015-03-31 Thread Ian Jackson
* Add two comments in libxl_remus_disk_drbd documenting buggy handling of the hotplug script exit status. * Add a section heading for async exec in libxl_aoutils.c * Mention the right function name (libxl__ev_child_fork, not libxl__ev_fork) in libxl_internal.h Signed-off-by: Ian Jackson CC:

[Xen-devel] [PATCH 05/28] libxl: suspend: Return correct error from callbacks

2015-03-31 Thread Ian Jackson
If a suspend callback fails, it has a libxl error code in its hand. However we must return to libxc the values that libxc expects. So we stash the libxl error code in dss->rc and fish it out again after libxc returns from the suspend call. While we're here, abolish the now-redundant `ok' variable

[Xen-devel] [PATCH 06/28] libxl: Use libxl__xswait* in libxl__ao_device

2015-03-31 Thread Ian Jackson
Replace the separate timeout and xenstore watch with use of libxl__xswait*. Different control flow, but no ultimate functional change apart from slight changes to the text of error messages. Signed-off-by: Ian Jackson --- tools/libxl/libxl_device.c | 64 -

[Xen-devel] [PATCH 01/28] libxl: Further fix exit paths from libxl_device_events_handler

2015-03-31 Thread Ian Jackson
On the success path, do not call GC_FREE explicitly. Instead, call AO_INPROGRESS. GC_FREE will free the gc underlying the long-term ao, which is then subsequently referenced in backend_watch_callback's call to libxl__nested_ao_create. It is a miracle that this ever works at all. Also, add an `i

[Xen-devel] [PATCH 08/28] libxl: devstate: Use libxl__xswait*

2015-03-31 Thread Ian Jackson
Signed-off-by: Ian Jackson Acked-by: Ian Campbell --- v3: Initialise ds->w.ao --- tools/libxl/libxl_device.c |4 +-- tools/libxl/libxl_event.c| 79 +++--- tools/libxl/libxl_internal.h | 11 +++--- 3 files changed, 41 insertions(+), 53 deletions(-

[Xen-devel] [PATCH RFC v3 00/28] libxl: Cancelling asynchronous operations

2015-03-31 Thread Ian Jackson
This is v3 of my work-in-progress series to support cancellation of long-running libxl operations. Changes from v2 are very minor: one bugfix, and comment and style changes. I have rebased this onto current xen.git#master (not #staging). I have compiled it and smoke tested it: it can do xl creat

Re: [Xen-devel] [PATCH 24/29] libxl: Introduce FILLZERO

2015-03-31 Thread Ian Jackson
Ian Campbell writes ("Re: [Xen-devel] [PATCH 24/29] libxl: Introduce FILLZERO"): > On Tue, 2015-02-10 at 20:10 +, Ian Jackson wrote: > > FILLZERO is a macro for memset(&foo,0,sizeof(foo)). It eliminates the > > possiblity to make the error memset(&foo,0,sizeof(&foo)). > > but not: > f

Re: [Xen-devel] [PATCH 22/29] libxl: Introduce DOMAIN_DESTROYED error code

2015-03-31 Thread Ian Jackson
Ian Campbell writes ("Re: [Xen-devel] [PATCH 22/29] libxl: Introduce DOMAIN_DESTROYED error code"): > Konrad has a semantically similar error code which he is adding, I think > in his recent libxl series to do with vcpu-set. That is valuable, I think. > AIUI Konrad's semantics are simply "domain

Re: [Xen-devel] [PATCH 21/29] libxl: cancellation: Make spawns cancellable

2015-03-31 Thread Ian Jackson
Ian Campbell writes ("Re: [Xen-devel] [PATCH 21/29] libxl: cancellation: Make spawns cancellable"): > On Tue, 2015-02-10 at 20:10 +, Ian Jackson wrote: > > The libxl__spawn_spawn internal API permits the caller to specify > > .timeout_ms==-1, meaning to wait forever. Provide an explicit > > c

Re: [Xen-devel] [PATCH 20/29] libxl: cancellation: Note that driver domain task cannot be usefully cancelled

2015-03-31 Thread Ian Jackson
Ian Campbell writes ("Re: [Xen-devel] [PATCH 20/29] libxl: cancellation: Note that driver domain task cannot be usefully cancelled"): > On Tue, 2015-02-10 at 20:10 +, Ian Jackson wrote: > > In practice, cancelling this task will cause all subsequent actual > > backend operations to fail, but w

Re: [Xen-devel] [PATCH 17/29] libxl: cancellation: Provide public ao cancellation API

2015-03-31 Thread Ian Jackson
Ian Campbell writes ("Re: [Xen-devel] [PATCH 17/29] libxl: cancellation: Provide public ao cancellation API"): > On Tue, 2015-02-10 at 20:10 +, Ian Jackson wrote: > > +/* > > + * For nested aos: > > + * Semantically, cancellation affects the whole tree of aos, > > + *not j

Re: [Xen-devel] [PATCH 17/29] libxl: cancellation: Provide public ao cancellation API

2015-03-31 Thread Ian Jackson
Ian Campbell writes ("Re: [Xen-devel] [PATCH 17/29] libxl: cancellation: Provide public ao cancellation API"): > On Tue, 2015-02-10 at 20:10 +, Ian Jackson wrote: > > +/* > > + * It is sometimes possible to cancel an asynchronous operation. > > + * > > + * libxl_ao_cancel searches for an ongoi

Re: [Xen-devel] [PATCH 13/29] libxl: domain create: Do not destroy on cancellation

2015-03-31 Thread Ian Jackson
Ian Campbell writes ("Re: [Xen-devel] [PATCH 13/29] libxl: domain create: Do not destroy on cancellation"): > I presume at some later stage in the series a suitable > LIBXL_HAVE_CANCELLATION will materialise? I mention it here because it > is on my mind. Yes, this is in libxl: cancellation: Pro

Re: [Xen-devel] [PATCH 11/29] libxl: events: Make libxl__async_exec_* pass caller an rc

2015-03-31 Thread Ian Jackson
Ian Campbell writes ("Re: [Xen-devel] [PATCH 11/29] libxl: events: Make libxl__async_exec_* pass caller an rc"): > On Tue, 2015-02-10 at 20:09 +, Ian Jackson wrote: > > diff --git a/tools/libxl/libxl_aoutils.c b/tools/libxl/libxl_aoutils.c > > index 754e2d1..891cdb8 100644 > > --- a/tools/libx

Re: [Xen-devel] [PATCH 16/29] libxl: ao: Provide manip_refcnt

2015-03-31 Thread Ian Jackson
Ian Campbell writes ("Re: [Xen-devel] [PATCH 16/29] libxl: ao: Provide manip_refcnt"): > On Tue, 2015-02-10 at 20:10 +, Ian Jackson wrote: > > +/* > > + * A "manip" is a libxl public function manipulating this ao, which > > + * has a pointer to it. We have to not destroy it while that's the >

Re: [Xen-devel] [PATCH 10/29] libxl: events: Make timeout and async exec setup take an ao, not a gc

2015-03-31 Thread Ian Jackson
Wen Congyang writes ("Re: [PATCH 10/29] libxl: events: Make timeout and async exec setup take an ao, not a gc"): > On 02/11/2015 04:09 AM, Ian Jackson wrote: > > Change the timeout setup functions to take a libxl__ao, not a > > libxl__gc. This is going to be needed for ao cancellation, because >

Re: [Xen-devel] [PATCH 06/29] libxl: Use libxl__xswait* in libxl__ao_device

2015-03-31 Thread Ian Jackson
Ian Campbell writes ("Re: [Xen-devel] [PATCH 06/29] libxl: Use libxl__xswait* in libxl__ao_device"): > On Tue, 2015-02-10 at 20:09 +, Ian Jackson wrote: > > @@ -1164,7 +1136,7 @@ static void device_hotplug_clean(libxl__gc *gc, > > libxl__ao_device *aodev) > > { > > /* Clean events and c

Re: [Xen-devel] [PATCH 04/29] libxl: suspend: common suspend callbacks take rc

2015-03-31 Thread Ian Jackson
Ian Campbell writes ("Re: [Xen-devel] [PATCH 04/29] libxl: suspend: common suspend callbacks take rc"): > On Tue, 2015-02-10 at 20:09 +, Ian Jackson wrote: > > Change the following functions to take a libxl error code rather than > > a boolean "ok" value, and translate that value to the boolea

Re: [Xen-devel] [PATCH 03/29] libxl: suspend: switch_logdirty_done takes rc

2015-03-31 Thread Ian Jackson
Ian Campbell writes ("Re: [Xen-devel] [PATCH 03/29] libxl: suspend: switch_logdirty_done takes rc"): > On Tue, 2015-02-10 at 20:09 +, Ian Jackson wrote: > > +int broke; > > +if (rc) { > > +broke = -1; > > +} else { > > +broke = 0; > > +} > > int broke = rc ? -1

Re: [Xen-devel] [PATCH v3 4/4] sched: credit2: consider per-vcpu soft affinity

2015-03-31 Thread George Dunlap
On 03/26/2015 09:48 AM, Justin T. Weaver wrote: > when making decisions for vcpus (run queue assignment, run queue migration, > cpu assignment, and cpu tickling). > > Added soft affinity balancing loops to... > * get_fallback_cpu > * runq_tickle (one for idle, but not tickled; one for non-idle,

Re: [Xen-devel] [PATCH v3 1/4] sched: credit2: respect per-vcpu hard affinity

2015-03-31 Thread George Dunlap
On 03/31/2015 06:14 PM, Dario Faggioli wrote: >>> diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c >>> index 7581731..af716e4 100644 >>> --- a/xen/common/sched_credit2.c >>> +++ b/xen/common/sched_credit2.c > >>> @@ -2024,6 +2096,13 @@ csched2_alloc_pdata(const struct scheduler

Re: [Xen-devel] [PATCH v4 25/33] xen/xsm: Add helpers to check permission for device tree passthrough

2015-03-31 Thread Julien Grall
Hi Daniel, On 31/03/15 18:12, Daniel De Graaf wrote: > On 03/19/2015 03:29 PM, Julien Grall wrote: >> This is a follow-up of commit 525ee49 "xsm: add device tree labeling >> support" which add support for device tree labelling in flask. >> >> Those helpers will be use latter when non-pci passthrou

Re: [Xen-devel] [PATCH v3 1/4] sched: credit2: respect per-vcpu hard affinity

2015-03-31 Thread Dario Faggioli
On Tue, 2015-03-31 at 15:37 +0100, George Dunlap wrote: > On 03/26/2015 09:48 AM, Justin T. Weaver wrote: > > by making sure that vcpus only run on the pcpu(s) they are allowed to > > run on based on their hard affinity cpu masks. > > > > Signed-off-by: Justin T. Weaver > > Hey Justin! Getting

Re: [Xen-devel] [PATCH v4 25/33] xen/xsm: Add helpers to check permission for device tree passthrough

2015-03-31 Thread Daniel De Graaf
On 03/19/2015 03:29 PM, Julien Grall wrote: This is a follow-up of commit 525ee49 "xsm: add device tree labeling support" which add support for device tree labelling in flask. Those helpers will be use latter when non-pci passthrough (i.e device tree) will be added. Signed-off-by: Julien Grall

Re: [Xen-devel] [PATCH v2 5/5] xen: sched_rt: print useful affinity info when dumping

2015-03-31 Thread Dario Faggioli
On Mon, 2015-03-30 at 14:47 +0100, George Dunlap wrote: > On 03/17/2015 03:33 PM, Dario Faggioli wrote: > > Such scratch area can be used to kill most of the > > cpumasks{_var}_t local variables in other functions > > in the file, but that is *NOT* done in this chage. > > > > Finally, convert the

Re: [Xen-devel] [PATCH] xen-blkback: define pr_fmt macro to avoid the duplication of DRV_PFX

2015-03-31 Thread Joe Perches
On Tue, 2015-03-31 at 16:57 +0200, Roger Pau Monné wrote: > El 31/03/15 a les 23.14, Tao Chen ha escrit: > > Define pr_fmt macro with {xen-blkback: } prefix, then remove all use > > of DRV_PFX in the pr and DPRINTK sentences. It will simplify the code. [] > > diff --git a/drivers/block/xen-blkback/

Re: [Xen-devel] [PATCH v1 3/3] xen/arm: smmu: Renaming struct iommu_domain *domain to, struct iommu_domain *iommu_domain

2015-03-31 Thread Stefano Stabellini
On Fri, 27 Mar 2015, Jaggi, Manish wrote: > From: Julien Grall > Sent: Friday, March 27, 2015 6:34 PM > To: Jaggi, Manish; Xen Devel; prasun.kap...@cavium.com; Kumar, Vijaya; Ian > Campbell; Stefano Stabellini > Subject: Re: [PATCH v1 3/3] xen/arm: smmu: Renaming struct iommu_domain > *domain to

Re: [Xen-devel] [PATCH OSSTEST v2 1/2] tcl: Handle environment variables which are unset.

2015-03-31 Thread Ian Campbell
On Tue, 2015-03-31 at 17:42 +0100, Ian Jackson wrote: > Ian Campbell writes ("[PATCH OSSTEST v2 1/2] tcl: Handle environment > variables which are unset."): > > This allows wrappers such as the standalone wrapper to do > > OSSTEST_SIMULATE=$foo ./sg-run-job > > and not worry if $foo is unset.

Re: [Xen-devel] [PATCH] x86: Factor out common CPU initialization code

2015-03-31 Thread Boris Ostrovsky
On 03/31/2015 11:55 AM, Ingo Molnar wrote: * Boris Ostrovsky wrote: Some of x86 bare-metal and Xen CPU initialization code is common between the two and therefore can be factored out to avoid code duplication. As a side effect, doing so will also extend the fix provided by commit a7fcf28d431

Re: [Xen-devel] [PATCH OSSTEST v2 1/2] tcl: Handle environment variables which are unset.

2015-03-31 Thread Ian Jackson
Ian Campbell writes ("[PATCH OSSTEST v2 1/2] tcl: Handle environment variables which are unset."): > This allows wrappers such as the standalone wrapper to do > OSSTEST_SIMULATE=$foo ./sg-run-job > and not worry if $foo is unset. > > Do likewise for OSSTEST_TCL_JOBDB_DEBUG. > > Signed-off-b

Re: [Xen-devel] [PATCH v3 8/8] tools: add tools support for Intel CAT

2015-03-31 Thread Ian Campbell
On Thu, 2015-03-26 at 20:38 +0800, Chao Peng wrote: > This is the xc/xl changes to support Intel Cache Allocation > Technology(CAT). Two commands are introduced: > - xl psr-cat-cbm-set [-s socket] > Set cache capacity bitmasks(CBM) for a domain. > - xl psr-cat-show > Show Cache Allocation Te

Re: [Xen-devel] domU jiffies not incrementing - timer issue? - Kernel 3.18.10 on Xen 4.5.0

2015-03-31 Thread Mark Chambers
On 31 March 2015 at 11:56, Mark Chambers wrote: > > > It's nested under Hyper-V in the same manner as the problematic install. I > was deliberately trying to replicate the issue, but the problem doesn't > manifest. > > Mark > >> > Hi, I've got it booting. The machine without boot problems report

Re: [Xen-devel] [PATCH v3] xentop: add support for qdisks

2015-03-31 Thread Ian Campbell
On Mon, 2015-03-30 at 16:20 +0100, Wei Liu wrote: > On Tue, Mar 24, 2015 at 04:59:47PM +, Ian Campbell wrote: > [...] > > > for running xentop in batch mode where the output can be captured. For > > > normal screen viewing, I doubt anyone has a screen with more that 1024 > > > lines on which to

Re: [Xen-devel] [PATCH v2 0/3] Automatically derive soft affinity from vnuma information

2015-03-31 Thread Ian Campbell
On Thu, 2015-03-26 at 09:54 +0100, Dario Faggioli wrote: > Round 2. All patches have Wei's Ack. Applied. Ian. ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

  1   2   3   >