[Xen-devel] [ovmf test] 113481: all pass - PUSHED

2017-09-15 Thread osstest service owner
flight 113481 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/113481/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 2f16993c255ca27bd3e8fa42489e8395d5308c3b baseline version: ovmf

[Xen-devel] [linux-linus test] 113472: regressions - FAIL

2017-09-15 Thread osstest service owner
flight 113472 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/113472/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemut-win7-amd64 16 guest-localmigrate/x10 fail REGR. vs. 113423 Regressions

[Xen-devel] [linux-next test] 113469: regressions - FAIL

2017-09-15 Thread osstest service owner
flight 113469 linux-next real [real] http://logs.test-lab.xenproject.org/osstest/logs/113469/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-libvirt-qcow2 17 guest-start/debian.repeat fail REGR. vs. 113453

Re: [Xen-devel] [PATCH v2 15/24] xen/arm: page: Prefix memory types with MT_

2017-09-15 Thread Stefano Stabellini
On Tue, 12 Sep 2017, Julien Grall wrote: > This will avoid confusion in the code when using them. > > Signed-off-by: Julien Grall > Reviewed-by: Andre Przywara Reviewed-by: Stefano Stabellini > --- > > Changes in v2:

Re: [Xen-devel] [PATCH v2 12/24] xen/arm: Replace ioremap_attr(PAGE_HYPERVISOR_NOCACHE) call by ioremap_nocache

2017-09-15 Thread Stefano Stabellini
On Tue, 12 Sep 2017, Julien Grall wrote: > ioremap_cache is a wrapper of ioremap_attr(...). > > Signed-off-by: Julien Grall > Reviewed-by: Andre Przywara Reviewed-by: Stefano Stabellini > --- > > Changes in v2: >

Re: [Xen-devel] [PATCH v2 11/24] xen/arm: traps: Improve logging for data/prefetch abort fault

2017-09-15 Thread Stefano Stabellini
On Tue, 12 Sep 2017, Julien Grall wrote: > Walk the hypervisor page table for data/prefetch abort fault to help > diagnostics error in the page tables. > > Signed-off-by: Julien Grall > Reviewed-by: Andre Przywara Acked-by: Stefano Stabellini

Re: [Xen-devel] [PATCH v2 10/24] xen/arm: traps: Introduce a helper to read the hypersivor fault register

2017-09-15 Thread Stefano Stabellini
On Tue, 12 Sep 2017, Julien Grall wrote: > While ARM32 has 2 distinct registers for the hypervisor fault register > (one for prefetch abort, the other for data abort), AArch64 has only > one. > > Currently, the logic is open-code but a follow-up patch will require to > read it too. So move the

Re: [Xen-devel] [PATCH v2 09/24] xen/arm: Introduce hsr_xabt to gather common bits between hsr_dabt and

2017-09-15 Thread Stefano Stabellini
On Tue, 12 Sep 2017, Julien Grall wrote: > This will allow to consolidate some part of the data abort and prefetch > abort handling in a single function later on. > > Signed-off-by: Julien Grall > Reviewed-by: Andre Przywara > > --- > Changes

Re: [Xen-devel] [PATCH v2 08/24] xen/arm: Add FnV field in hsr_*abt

2017-09-15 Thread Stefano Stabellini
On Tue, 12 Sep 2017, Julien Grall wrote: > FnV (FAR not Valid) bit was introduced by ARMv8 in both AArch32 and > AArch64 (See D7-2275, D7-2277, G6-4958, G6-4962 in ARM DDI 0487B.a). > > Note the new revision of ARMv8 defined more bits in HSR. They haven't > been added at the moment because we

Re: [Xen-devel] [PATCH v2 04/24] xen/arm: mm: Redefine mfn_to_virt to use typesafe

2017-09-15 Thread Stefano Stabellini
On Tue, 12 Sep 2017, Julien Grall wrote: > This add a bit more safety in the memory subsystem code. > > Signed-off-by: Julien Grall > --- > xen/arch/arm/mm.c | 16 +--- > 1 file changed, 9 insertions(+), 7 deletions(-) > > diff --git a/xen/arch/arm/mm.c

Re: [Xen-devel] [PATCH v2 07/24] xen/arm: arm32: Don't define FAR_EL1

2017-09-15 Thread Stefano Stabellini
On Tue, 12 Sep 2017, Julien Grall wrote: > Aliasing FAR_EL1 to IFAR is wrong because on ARMv8 FAR_EL1[31:0] is > architecturally mapped to DFAR and FAR_EL1[63:32] to IFAR. > > As FAR_EL1 is not currently used in ARM32 code, remove it. > > Signed-off-by: Julien Grall >

Re: [Xen-devel] [PATCH v2 06/24] xen/arm: traps: Don't define FAR_EL2 for ARM32

2017-09-15 Thread Stefano Stabellini
On Tue, 12 Sep 2017, Julien Grall wrote: > Aliasing FAR_EL2 to HIFAR makes the code confusing because on ARMv8 > FAR_EL2[31:0] is architecturally mapped to HDFAR and FAR_EL2[63:32] to > HIFAR. See D7.2.30 in ARM DDI 0487B.a. Open-code the alias instead. > > Signed-off-by: Julien Grall

[Xen-devel] [xen-unstable-smoke test] 113493: tolerable all pass - PUSHED

2017-09-15 Thread osstest service owner
flight 113493 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/113493/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 13 migrate-support-checkfail never pass test-armhf-armhf-xl

Re: [Xen-devel] [PATCH v2 05/24] xen/arm: hsr_iabt: Document RES0 field

2017-09-15 Thread Stefano Stabellini
On Tue, 12 Sep 2017, Julien Grall wrote: > Signed-off-by: Julien Grall > Reviewed-by: Andre Przywara Acked-by: Stefano Stabellini > --- > > Note that the missing FnV bits present ARMv8 will be added in a >

Re: [Xen-devel] [PATCH v2 03/24] xen/mm: Use __virt_to_mfn in map_domain_page instead of virt_to_mfn

2017-09-15 Thread Stefano Stabellini
On Tue, 12 Sep 2017, Julien Grall wrote: > virt_to_mfn may by overridden by the source files, for improving locally > typesafe. > > Therefore map_domain_page has to use __virt_to_mfn to prevent any > compilation issue in sources files that override the helper. > > Signed-off-by: Julien Grall

Re: [Xen-devel] [PATCH v2 02/24] xen/mm: Use typesafe MFN for alloc_boot_pages return

2017-09-15 Thread Stefano Stabellini
On Tue, 12 Sep 2017, Julien Grall wrote: > At the moment, most of the callers will have to use mfn_x. However > follow-up patches will remove some of them by propagating the typesafe a > bit further. > > Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini

[Xen-devel] [PATCH v4 06/13] xen/pvcalls: implement bind command

2017-09-15 Thread Stefano Stabellini
Send PVCALLS_BIND to the backend. Introduce a new structure, part of struct sock_mapping, to store information specific to passive sockets. Introduce a status field to keep track of the status of the passive socket. Signed-off-by: Stefano Stabellini CC:

[Xen-devel] [PATCH v4 02/13] xen/pvcalls: implement frontend disconnect

2017-09-15 Thread Stefano Stabellini
Introduce a data structure named pvcalls_bedata. It contains pointers to the command ring, the event channel, a list of active sockets and a list of passive sockets. Lists accesses are protected by a spin_lock. Introduce a waitqueue to allow waiting for a response on commands sent to the backend.

[Xen-devel] [PATCH v4 04/13] xen/pvcalls: implement socket command and handle events

2017-09-15 Thread Stefano Stabellini
Send a PVCALLS_SOCKET command to the backend, use the masked req_prod_pvt as req_id. This way, req_id is guaranteed to be between 0 and PVCALLS_NR_REQ_PER_RING. We already have a slot in the rsp array ready for the response, and there cannot be two outstanding responses with the same req_id. Wait

[Xen-devel] [PATCH v4 08/13] xen/pvcalls: implement accept command

2017-09-15 Thread Stefano Stabellini
Introduce a waitqueue to allow only one outstanding accept command at any given time and to implement polling on the passive socket. Introduce a flags field to keep track of in-flight accept and poll commands. Send PVCALLS_ACCEPT to the backend. Allocate a new active socket. Make sure that only

[Xen-devel] [PATCH v4 11/13] xen/pvcalls: implement poll command

2017-09-15 Thread Stefano Stabellini
For active sockets, check the indexes and use the inflight_conn_req waitqueue to wait. For passive sockets if an accept is outstanding (PVCALLS_FLAG_ACCEPT_INFLIGHT), check if it has been answered by looking at bedata->rsp[req_id]. If so, return POLLIN. Otherwise use the inflight_accept_req

[Xen-devel] [PATCH v4 13/13] xen: introduce a Kconfig option to enable the pvcalls frontend

2017-09-15 Thread Stefano Stabellini
Also add pvcalls-front to the Makefile. Signed-off-by: Stefano Stabellini CC: boris.ostrov...@oracle.com CC: jgr...@suse.com --- drivers/xen/Kconfig | 9 + drivers/xen/Makefile | 1 + 2 files changed, 10 insertions(+) diff --git a/drivers/xen/Kconfig

[Xen-devel] [PATCH v4 07/13] xen/pvcalls: implement listen command

2017-09-15 Thread Stefano Stabellini
Send PVCALLS_LISTEN to the backend. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky CC: boris.ostrov...@oracle.com CC: jgr...@suse.com --- drivers/xen/pvcalls-front.c | 56 +

[Xen-devel] [PATCH v4 09/13] xen/pvcalls: implement sendmsg

2017-09-15 Thread Stefano Stabellini
Send data to an active socket by copying data to the "out" ring. Take the active socket out_mutex so that only one function can access the ring at any given time. If not enough room is available on the ring, rather than returning immediately or sleep-waiting, spin for up to 5000 cycles. This

[Xen-devel] [PATCH v4 05/13] xen/pvcalls: implement connect command

2017-09-15 Thread Stefano Stabellini
Send PVCALLS_CONNECT to the backend. Allocate a new ring and evtchn for the active socket. Introduce fields in struct sock_mapping to keep track of active sockets. Introduce a waitqueue to allow the frontend to wait on data coming from the backend on the active socket (recvmsg command). Two

[Xen-devel] [PATCH v4 10/13] xen/pvcalls: implement recvmsg

2017-09-15 Thread Stefano Stabellini
Implement recvmsg by copying data from the "in" ring. If not enough data is available and the recvmsg call is blocking, then wait on the inflight_conn_req waitqueue. Take the active socket in_mutex so that only one function can access the ring at any given time. Signed-off-by: Stefano Stabellini

[Xen-devel] [PATCH v4 12/13] xen/pvcalls: implement release command

2017-09-15 Thread Stefano Stabellini
Send PVCALLS_RELEASE to the backend and wait for a reply. Take both in_mutex and out_mutex to avoid concurrent accesses. Then, free the socket. For passive sockets, check whether we have already pre-allocated an active socket for the purpose of being accepted. If so, free that as well.

[Xen-devel] [PATCH v4 00/13] introduce the Xen PV Calls frontend

2017-09-15 Thread Stefano Stabellini
Hi all, this series introduces the frontend for the newly introduced PV Calls procotol. PV Calls is a paravirtualized protocol that allows the implementation of a set of POSIX functions in a different domain. The PV Calls frontend sends POSIX function calls to the backend, which implements them

[Xen-devel] [PATCH v4 01/13] xen/pvcalls: introduce the pvcalls xenbus frontend

2017-09-15 Thread Stefano Stabellini
Introduce a xenbus frontend for the pvcalls protocol, as defined by https://xenbits.xen.org/docs/unstable/misc/pvcalls.html. This patch only adds the stubs, the code will be added by the following patches. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky

[Xen-devel] [PATCH v4 03/13] xen/pvcalls: connect to the backend

2017-09-15 Thread Stefano Stabellini
Implement the probe function for the pvcalls frontend. Read the supported versions, max-page-order and function-calls nodes from xenstore. Only one frontend<->backend connection is supported at any given time for a guest. Store the active frontend device to a static pointer. Introduce a stub

Re: [Xen-devel] [PATCH v1 0/2] Misc fixes regarding releasing resources on ARM

2017-09-15 Thread Stefano Stabellini
On Mon, 28 Aug 2017, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko Thanks for the fixes, I committed the two patches. > Oleksandr Tyshchenko (2): > xen/arm: vgic: Check for vgic handler to be initialized before > dereferencing it > xen/arm:

Re: [Xen-devel] [PATCH v1 2/2] xen/arm: p2m: Check for p2m->domain to be initialized before releasing resources

2017-09-15 Thread Stefano Stabellini
On Mon, 28 Aug 2017, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > Since p2m_teardown() can be called when p2m_init() haven't executed yet > we might deal with unitialized list "p2m->pages" which leads to crash. > To avoid this use back pointer to

Re: [Xen-devel] [PATCH v1 1/2] xen/arm: vgic: Check for vgic handler to be initialized before dereferencing it

2017-09-15 Thread Stefano Stabellini
On Mon, 28 Aug 2017, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > Since domain_vgic_free() can be called when the vgic_ops haven't been > initialised yet, always check that d->arch.vgic.handler is not a null. > > Signed-off-by: Oleksandr Tyshchenko

[Xen-devel] [seabios test] 113466: regressions - FAIL

2017-09-15 Thread osstest service owner
flight 113466 seabios real [real] http://logs.test-lab.xenproject.org/osstest/logs/113466/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-win7-amd64 16 guest-localmigrate/x10 fail REGR. vs. 113452 Tests which did

Re: [Xen-devel] CONFIG_SCRUB_DEBUG=y + arm64 + livepatch = Xen BUG at page_alloc.c:738

2017-09-15 Thread Julien Grall
Hi, On 15/09/2017 20:50, Konrad Rzeszutek Wilk wrote: .snip.. (XEN) Loading dom0 DTB to 0x17e0-0x17e08265 (XEN) init_domheap_pages: 0xb87b1->0xb87bc (XEN) init_heap_pages: 0xb87b1 -> 0xb87bc (XEN) init_domheap_pages: 0xb88f1->0xb98ae (XEN) init_heap_pages: 0xb88f1 ->

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

2017-09-15 Thread osstest service owner
flight 113464 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/113464/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-win7-amd64 16 guest-localmigrate/x10 fail REGR. vs. 113302

Re: [Xen-devel] CONFIG_SCRUB_DEBUG=y + arm64 + livepatch = Xen BUG at page_alloc.c:738

2017-09-15 Thread Konrad Rzeszutek Wilk
.snip.. > (XEN) Loading dom0 DTB to 0x17e0-0x17e08265 > (XEN) init_domheap_pages: 0xb87b1->0xb87bc > (XEN) init_heap_pages: 0xb87b1 -> 0xb87bc > (XEN) init_domheap_pages: 0xb88f1->0xb98ae > (XEN) init_heap_pages: 0xb88f1 -> 0xb98ae <- so the memory is from here > > (XEN)

[Xen-devel] [libvirt test] 113465: tolerable all pass - PUSHED

2017-09-15 Thread osstest service owner
flight 113465 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/113465/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 14 saverestore-support-checkfail like 113434 test-armhf-armhf-libvirt-xsm 14

[Xen-devel] [PATCH] xen: x86: mark xen_find_pt_base as __init

2017-09-15 Thread Arnd Bergmann
gcc-4.6 causes a harmless link-time warning: WARNING: vmlinux.o(.text.unlikely+0x48e): Section mismatch in reference from the function xen_find_pt_base() to the function .init.text:m2p() The function xen_find_pt_base() references the function __init m2p(). This is often because xen_find_pt_base

Re: [Xen-devel] CONFIG_SCRUB_DEBUG=y + arm64 + livepatch = Xen BUG at page_alloc.c:738

2017-09-15 Thread Boris Ostrovsky
> So in other words, it looks like scrub_heap_pages is somehow not > including this MFN. That would be a problem. How does NUMA info look like? -boris ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

[Xen-devel] [PATCH 21/22] libxl: dm_restrict: Support uid range user

2017-09-15 Thread Ian Jackson
Signed-off-by: Ian Jackson --- docs/man/xl.cfg.pod.5.in | 11 ++- tools/libxl/libxl_dm.c | 32 tools/libxl/libxl_internal.h | 1 + 3 files changed, 43 insertions(+), 1 deletion(-) diff --git

[Xen-devel] [PATCH 15/22] xentoolcore_restrict_all: "Implement" for xenstore

2017-09-15 Thread Ian Jackson
Signed-off-by: Ian Jackson --- tools/Rules.mk| 2 +- tools/xenstore/Makefile | 7 --- tools/xenstore/xenstore.pc.in | 2 +- tools/xenstore/xs.c | 14 ++ 4 files changed, 20 insertions(+), 5 deletions(-) diff --git

[Xen-devel] [PATCH 05/22] libxl: #include "xentoolcore_internal.h"

2017-09-15 Thread Ian Jackson
We are going to want to move something here. Signed-off-by: Ian Jackson --- tools/libxl/Makefile | 11 ++- tools/libxl/libxl_internal.h | 2 ++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile

[Xen-devel] [PATCH 00/22] Provide some actual restriction of qemu

2017-09-15 Thread Ian Jackson
With this series, it is possible to run qemu in a way that I think really does not have global privilege any more> I have verified that it runs as a non-root user. I have checked all of its fds and they are either privcmd (which I have arranged to neuter), or /dev/null, or harmless sockets and

[Xen-devel] [PATCH 19/22] libxl: libxl__dm_runas_helper: return pwd

2017-09-15 Thread Ian Jackson
Signed-off-by: Ian Jackson --- tools/libxl/libxl_dm.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index 831c397..3c4ef2b 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c

[Xen-devel] [PATCH 18/22] libxl: Rationalise calculation of user to run qemu as

2017-09-15 Thread Ian Jackson
If the config specifies a user we use that. Otherwise: When we are not restricting qemu, there is very little point running it as a different user than root. Indeed, previously, creating the "magic" users would cause qemu to become slightly dysfunctional (for example, you can't insert a cd that

[Xen-devel] [PATCH 09/22] xentoolcore_restrict: Break out xentoolcore__restrict_by_dup2_null

2017-09-15 Thread Ian Jackson
Signed-off-by: Ian Jackson --- tools/libs/call/core.c | 30 +- tools/libs/toolcore/handlereg.c| 26 +++ tools/libs/toolcore/include/xentoolcore_internal.h | 12 +

[Xen-devel] [PATCH 17/22] xl, libxl: Provide dm_restrict

2017-09-15 Thread Ian Jackson
This functionality is still quite imperfect, but it will be useful in certain restricted use cases. Signed-off-by: Ian Jackson --- docs/man/xl.cfg.pod.5.in| 86 + tools/libxl/libxl_create.c | 1 +

[Xen-devel] [PATCH 04/22] tools: qemu-xen build: prepare to link against xentoolcore

2017-09-15 Thread Ian Jackson
Signed-off-by: Ian Jackson --- tools/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/Makefile b/tools/Makefile index 11ad42c..03d326a 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -244,6 +244,7 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find

[Xen-devel] [PATCH 14/22] tools/xenstore: get_handle: Allocate struct before opening fd

2017-09-15 Thread Ian Jackson
Now we can also abolish the temporary local variable "fd" and simply use h->fd. This ordering is necessary to be able to call xentoolcore__register_active_handle sensibly. Signed-off-by: Ian Jackson --- tools/xenstore/xs.c | 28 +++- 1 file

[Xen-devel] [PATCH 12/22] xentoolcore_restrict_all: "Implement" for xengnttab

2017-09-15 Thread Ian Jackson
Signed-off-by: Ian Jackson --- tools/Rules.mk| 2 +- tools/libs/gnttab/Makefile| 4 ++-- tools/libs/gnttab/gnttab_core.c | 10 ++ tools/libs/gnttab/private.h | 2 ++ tools/libs/gnttab/xengnttab.pc.in | 2 +- 5 files

[Xen-devel] [PATCH 22/22] RFC: tools: xentoolcore_restrict_all: use domid_t

2017-09-15 Thread Ian Jackson
This is an RFC because it does not currently compile, because not all the places that use xentoolcore have a definition of domid in scope! Signed-off-by: Ian Jackson --- tools/libs/toolcore/handlereg.c| 2 +-

[Xen-devel] [PATCH 16/22] xentoolcore, _restrict_all: Document implementation "complete"

2017-09-15 Thread Ian Jackson
Signed-off-by: Ian Jackson --- tools/libs/toolcore/include/xentoolcore.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/libs/toolcore/include/xentoolcore.h b/tools/libs/toolcore/include/xentoolcore.h index 1210d7d..52f7aa3 100644 ---

[Xen-devel] [PATCH 20/22] libxl: userlookup_helper_getpwnam rename and turn into a macro

2017-09-15 Thread Ian Jackson
We are going to want versions of getpwuid, too. And maybe in the future getgr*. This is most sanely achieved with a macro, as otherwise the types are a mess. Signed-off-by: Ian Jackson --- tools/libxl/libxl_dm.c | 79

[Xen-devel] [PATCH 11/22] xentoolcore_restrict_all: Declare problems due to no evtchn support

2017-09-15 Thread Ian Jackson
Signed-off-by: Ian Jackson --- tools/libs/toolcore/include/xentoolcore.h | 5 + 1 file changed, 5 insertions(+) diff --git a/tools/libs/toolcore/include/xentoolcore.h b/tools/libs/toolcore/include/xentoolcore.h index 1ab646e..1210d7d 100644 ---

[Xen-devel] [PATCH 13/22] tools/xenstore: get_handle: use "goto err" error handling style

2017-09-15 Thread Ian Jackson
Replace the ad-hoc exit clauses with the error handling style where - local variables contain either things to be freed, or sentinels - all error exits go via an "err" label which frees everything Signed-off-by: Ian Jackson --- tools/xenstore/xs.c | 21

[Xen-devel] [PATCH 08/22] xentoolcore_restrict_all: "Implement" for libxencall

2017-09-15 Thread Ian Jackson
Signed-off-by: Ian Jackson --- tools/Rules.mk| 2 +- tools/libs/call/Makefile | 4 ++-- tools/libs/call/core.c| 37 + tools/libs/call/linux.c | 4 tools/libs/call/private.h | 2 ++

[Xen-devel] [PATCH 03/22] xentoolcore, _restrict_all: Introduce new library and implementation

2017-09-15 Thread Ian Jackson
In practice, qemu opens a great many fds. Tracking them all down and playing whack-a-mole is unattractive. It is also potentially fragile in that future changes might accidentally undo our efforts. Instead, we are going to teach all the Xen libraries how to register their fds so that they can

[Xen-devel] [PATCH 07/22] xentoolcore_restrict_all: Implement for libxendevicemodel

2017-09-15 Thread Ian Jackson
Signed-off-by: Ian Jackson --- tools/Rules.mk | 2 +- tools/libs/devicemodel/Makefile | 3 ++- tools/libs/devicemodel/core.c | 16 tools/libs/devicemodel/private.h| 3 +++

[Xen-devel] [PATCH 06/22] tools: move CONTAINER_OF to xentoolcore_internal.h

2017-09-15 Thread Ian Jackson
Signed-off-by: Ian Jackson --- tools/libs/toolcore/include/xentoolcore_internal.h | 42 ++ tools/libxl/libxl_internal.h | 30 2 files changed, 42 insertions(+), 30 deletions(-) diff --git

[Xen-devel] [PATCH 01/22] xen: Provide XEN_DMOP_remote_shutdown

2017-09-15 Thread Ian Jackson
SCHEDOP_remote_shutdown should be a DMOP so that a deprivileged qemu can do the propery tidying up. We should remove SCHEDOP_remote_shutdown at some point. CC: Jan Beulich CC: Andrew Cooper CC: George Dunlap CC: Konrad

[Xen-devel] [PATCH 02/22] tools: libxendevicemodel: Provide xendevicemodel_shutdown

2017-09-15 Thread Ian Jackson
Signed-off-by: Ian Jackson --- tools/libs/devicemodel/core.c | 16 tools/libs/devicemodel/include/xendevicemodel.h | 9 + tools/libs/devicemodel/libxendevicemodel.map| 1 + 3 files changed, 26 insertions(+) diff --git

[Xen-devel] [PATCH 10/22] xentoolcore_restrict_all: Implement for libxenforeignmemory

2017-09-15 Thread Ian Jackson
Signed-off-by: Ian Jackson --- tools/Rules.mk | 2 +- tools/libs/foreignmemory/Makefile | 4 ++-- tools/libs/foreignmemory/core.c | 15 +++ tools/libs/foreignmemory/private.h | 3

Re: [Xen-devel] CONFIG_SCRUB_DEBUG=y + arm64 + livepatch = Xen BUG at page_alloc.c:738

2017-09-15 Thread Konrad Rzeszutek Wilk
On Thu, Sep 14, 2017 at 05:39:23PM -0400, Boris Ostrovsky wrote: > On 09/14/2017 05:26 PM, Konrad Rzeszutek Wilk wrote: > > On Wed, Sep 13, 2017 at 02:49:41PM -0400, Boris Ostrovsky wrote: > >> On 09/13/2017 02:25 PM, Julien Grall wrote: > >>> Hi, > >>> > >>> On 09/13/2017 07:05 PM, Boris

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

2017-09-15 Thread osstest service owner
flight 113460 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/113460/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemut-debianhvm-amd64-xsm 10 debian-hvm-install fail REGR. vs. 113387

[Xen-devel] [PATCH] qemu-xen-traditional: Link against xentoolcore

2017-09-15 Thread Ian Jackson
This should be inserted into the libxl xen.git series as a qemu tag update, just after the library is introduced but before it is used. Signed-off-by: Ian Jackson --- xen-hooks.mak | 1 + 1 file changed, 1 insertion(+) diff --git a/xen-hooks.mak b/xen-hooks.mak index

[Xen-devel] [ovmf baseline-only test] 72112: all pass

2017-09-15 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 72112 ovmf real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/72112/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 11b4463e096523fe03ac840472d483652ae93904 baseline

[Xen-devel] [xen-unstable-smoke test] 113480: tolerable all pass - PUSHED

2017-09-15 Thread osstest service owner
flight 113480 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/113480/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 13 migrate-support-checkfail never pass test-armhf-armhf-xl

[Xen-devel] [PATCH 1/3] xen: timers: don't miss a timer event because of stop_timer()

2017-09-15 Thread Dario Faggioli
If stop_timer() is called between when a timer interrupt arrives (and TIMER_SOFTIRQ is raised) and when softirqs are checked and handled, the timer that has fire is (right in stop_timer()) deactivated, and the handler for that occurrence of the interrupt never executed. This happens, e.g. to

[Xen-devel] [PATCH 2/3] xen: RCU: make the period of the idle timer configurable.

2017-09-15 Thread Dario Faggioli
Make it possible for the user to specify, with the boot time parameter rcu_idle_timer_period_ms, how frequently a CPU that went idle with pending RCU callbacks should be woken up to check if the grace period ended. Typical values (i.e., some of the values used by Linux as the tick frequency) are

[Xen-devel] [PATCH 0/3] xen: RCU: Improve the idle timer handling

2017-09-15 Thread Dario Faggioli
Hello, this series is the followup of my previous RCU series. It contains: - the patch that makes the period of the RCU idle timer configurable, via a Xen boot time parameter, as suggested by Jan, during review of the original series (patch 2); - the patch that makse the period of the RCU

[Xen-devel] [PATCH 3/3] xen: RCU: make the period of the idle timer adaptive.

2017-09-15 Thread Dario Faggioli
Basically, if the RCU idle timer, when (if!) it fires, finds that the grace period isn't over, we increase the timer's period (i.e., it will fire later, next time). If, OTOH, it finds the grace period is already finished, we decrease the timer's period (i.e., it will fire a bit earlier next time).

[Xen-devel] [PATCH 4/4] xen: sched: simplify (and speedup) checking soft-affinity

2017-09-15 Thread Dario Faggioli
The fact of whether or not a vCPU has a soft-affinity which is effective, i.e., with the power of actually affecting the scheduling of the vCPU itself rarely changes. Very, very rarely, as compared to how often we need to check for the same thing (basically, at every scheduling decision!). That

[Xen-devel] [PATCH 2/4] xen: sched: optimize exclusive pinning case (Credit1 & 2)

2017-09-15 Thread Dario Faggioli
Exclusive pinning of vCPUs is used, sometimes, for achieving the highest level of determinism, and the least possible overhead, for the vCPUs in question. Although static 1:1 pinning is not recommended, for general use cases, optimizing the tickling code (of Credit1 and Credit2) is easy and cheap

[Xen-devel] [PATCH 1/4] xen: sched: introduce 'adjust_affinity' hook.

2017-09-15 Thread Dario Faggioli
For now, just as a way to give a scheduler an "heads up", about the fact that the affinity changed. This enables some optimizations, such as pre-computing and storing (e.g., in flags) facts like a vcpu being exclusively pinned to a pcpu, or having or not a soft affinity. I.e., conditions that,

[Xen-devel] [PATCH 0/4] xen: sched: optimize exclusive pinning and soft-affinity checking

2017-09-15 Thread Dario Faggioli
Hello, This series is a rework of a patch that was, originally, sent as part of a series (which went in already): https://lists.xen.org/archives/html/xen-devel/2017-07/msg02167.html As it can be seen in the message above, George suggested doing things a little bit differently, and I agreed.

[Xen-devel] [PATCH 3/4] xen: sched: improve checking soft-affinity

2017-09-15 Thread Dario Faggioli
Whether or not a vCPU has a soft-affinity which is effective, i.e., with the power of actually affecting the scheduling of the vCPU itself, happens in an helper function, called has_soft_affinity(). Such function takes a custom cpumask as its third parameter, for better flexibility, but that mask

Re: [Xen-devel] [PATCH v2 13/17] x86emul: re-order checks in test harness

2017-09-15 Thread Andrew Cooper
On 14/09/17 16:19, Jan Beulich wrote: On older systems printing the "n/a" messages (resulting from the compiler not being new enough to deal with some of the test code) isn't very useful: If both CPU and compiler are too old for a certain test, we can as well omit those messages, as those tests

Re: [Xen-devel] [PATCH v3] hvmloader: Use MB(x) and GB(x) macros

2017-09-15 Thread Konrad Rzeszutek Wilk
On Fri, Sep 15, 2017 at 05:57:50PM +0100, Wei Liu wrote: > On Fri, Sep 15, 2017 at 12:55:51PM -0400, Konrad Rzeszutek Wilk wrote: > > instead of hardcoding values. We also drop the uint64_t > > cast as the macro uses ULL to produce the proper width > > types. > > > > Acked-by: Jan Beulich

Re: [Xen-devel] [PATCH v2 02/17] x86emul: re-order cases of main switch statement

2017-09-15 Thread Andrew Cooper
On 14/09/17 16:12, Jan Beulich wrote: Re-store intended numerical ordering, which has become "violated" mostly by incremental additions where moving around bigger chunks did not seem advisable. One exception though at the very top of the switch(): Keeping the arithmetic ops together seems

Re: [Xen-devel] [PATCH v2 08/17] x86emul: fold/eliminate some local variables

2017-09-15 Thread Andrew Cooper
On 14/09/17 16:16, Jan Beulich wrote: Make i switch-wide (at once making it unsigned, as it should have been) and introduce n (for immediate use in enter and aam/aad handling). Eliminate on-stack arrays in pusha/popa handling. Use ea.val instead of a custom variable in bound handling. No

Re: [Xen-devel] [PATCH] mm: Scrub pages returned back to heap if MEMF_no_scrub is set

2017-09-15 Thread Konrad Rzeszutek Wilk
On Fri, Sep 15, 2017 at 12:47:29PM -0400, Boris Ostrovsky wrote: > On 09/15/2017 12:05 PM, Jan Beulich wrote: > On 15.09.17 at 16:04, wrote: > >> Set free_heap_pages()'s need_scrub to true if alloc_domheap_pages() > >> returns pages back to heap as result of

Re: [Xen-devel] [PATCH 1/3] python: Add binding for xs_fileno()

2017-09-15 Thread Konrad Rzeszutek Wilk
On Fri, Sep 15, 2017 at 05:35:34PM +0100, Euan Harris wrote: > xs_fileno() returns a file descriptor which receives events when Xenstore > watches fire. Exposing this in the Python bindings is a prerequisite > for writing event-driven clients in Python. > > Signed-off-by: Euan Harris

Re: [Xen-devel] [PATCH v3] hvmloader: Use MB(x) and GB(x) macros

2017-09-15 Thread Wei Liu
On Fri, Sep 15, 2017 at 12:55:51PM -0400, Konrad Rzeszutek Wilk wrote: > instead of hardcoding values. We also drop the uint64_t > cast as the macro uses ULL to produce the proper width > types. > > Acked-by: Jan Beulich > Signed-off-by: Konrad Rzeszutek Wilk

[Xen-devel] [PATCH v3] Left over patches from long-time ago.

2017-09-15 Thread Konrad Rzeszutek Wilk
Hey, I was cleaning my mailbox and noticed that I still hadn't this done. This one was from 2016 and it looks like I just never sent it out (even thought I did the fix the next day). I never got to fix the other patch: https://lists.xen.org/archives/html/xen-devel/2016-09/msg03191.html Anyhow,

[Xen-devel] [PATCH v3] hvmloader: Use MB(x) and GB(x) macros

2017-09-15 Thread Konrad Rzeszutek Wilk
instead of hardcoding values. We also drop the uint64_t cast as the macro uses ULL to produce the proper width types. Acked-by: Jan Beulich Signed-off-by: Konrad Rzeszutek Wilk --- Cc: Jan Beulich Cc: Andrew Cooper

Re: [Xen-devel] [PATCH] mm: Scrub pages returned back to heap if MEMF_no_scrub is set

2017-09-15 Thread Boris Ostrovsky
On 09/15/2017 12:05 PM, Jan Beulich wrote: On 15.09.17 at 16:04, wrote: >> Set free_heap_pages()'s need_scrub to true if alloc_domheap_pages() >> returns pages back to heap as result of assign_pages() error when those >> pages were requested with MEMF_no_scrub

[Xen-devel] [PATCH 2/3] python: Extract registered watch search logic from xspy_read_watch()

2017-09-15 Thread Euan Harris
When a watch fires, xspy_read_watch() checks whether the client has registered interest in the path which changed and, if so, returns the path and a client-supplied token. The binding for xs_check_watch() needs to do the same, so this patch extracts the search code into a separate function.

[Xen-devel] [PATCH 0/3] python: Add non-blocking Xenstore watch bindings

2017-09-15 Thread Euan Harris
Expose xs_fileno() and xs_check_watch() to Python. These functions make it posible to write event-driven Xenstore clients in Python: #!/usr/bin/env python import xen.lowlevel.xs import sys import errno from select import select import time # Connect to XenStore and set

[Xen-devel] [PATCH 1/3] python: Add binding for xs_fileno()

2017-09-15 Thread Euan Harris
xs_fileno() returns a file descriptor which receives events when Xenstore watches fire. Exposing this in the Python bindings is a prerequisite for writing event-driven clients in Python. Signed-off-by: Euan Harris --- tools/python/xen/lowlevel/xs/xs.c | 20

[Xen-devel] [PATCH 3/3] python: Add binding for non-blocking xs_check_watch()

2017-09-15 Thread Euan Harris
xs_check_watch() checks for watch notifications without blocking. Together with the binding for xs_fileno(), this makes it possible to write event-driven clients in Python. Signed-off-by: Euan Harris --- tools/python/xen/lowlevel/xs/xs.c | 28

[Xen-devel] [seabios baseline-only test] 72110: regressions - FAIL

2017-09-15 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 72110 seabios real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/72110/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-win10-i386 10

Re: [Xen-devel] [PATCH] mm: Scrub pages returned back to heap if MEMF_no_scrub is set

2017-09-15 Thread Jan Beulich
>>> On 15.09.17 at 16:04, wrote: > Set free_heap_pages()'s need_scrub to true if alloc_domheap_pages() > returns pages back to heap as result of assign_pages() error when those > pages were requested with MEMF_no_scrub flag. > > We need to do this because there is a

Re: [Xen-devel] [PATCH v2 2/5] libxl: enable per-VCPU extratime flag for RTDS

2017-09-15 Thread Meng Xu
On Wed, Sep 13, 2017 at 8:16 PM, Dario Faggioli wrote: > On Fri, 2017-09-01 at 12:03 -0400, Meng Xu wrote: >> On Fri, Sep 1, 2017 at 11:58 AM, Meng Xu >> wrote: >> > @@ -705,6 +717,12 @@ static int sched_rtds_domain_set(libxl__gc >> > *gc,

[Xen-devel] [ovmf test] 113462: all pass - PUSHED

2017-09-15 Thread osstest service owner
flight 113462 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/113462/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 11b4463e096523fe03ac840472d483652ae93904 baseline version: ovmf

[Xen-devel] [linux-4.9 test] 113458: regressions - FAIL

2017-09-15 Thread osstest service owner
flight 113458 linux-4.9 real [real] http://logs.test-lab.xenproject.org/osstest/logs/113458/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemut-win7-amd64 16 guest-localmigrate/x10 fail REGR. vs. 113202 Tests which

Re: [Xen-devel] [PATCH v2 1/5] xen:rtds: towards work conserving RTDS

2017-09-15 Thread Meng Xu
Hi Dario, On Wed, Sep 13, 2017 at 9:06 PM, Dario Faggioli wrote: > > On Fri, 2017-09-01 at 11:58 -0400, Meng Xu wrote: > > Make RTDS scheduler work conserving without breaking the real-time > > guarantees. > > > > VCPU model: > > Each real-time VCPU is extended to have

Re: [Xen-devel] [PATCH RFC v2] Add SUPPORT.md

2017-09-15 Thread Konrad Rzeszutek Wilk
> +### Soft-reset for PV guests s/PV/HVM/ > + > +Status: Supported > + > +Soft-reset allows a new kernel to start 'from scratch' with a fresh VM > state, > +but with all the memory from the previous state of the VM intact. > +This is primarily designed to allow "crash kernels", >

Re: [Xen-devel] [PATCH] xen: grant-table: Simplify get_page_frame

2017-09-15 Thread Julien Grall
Hi Jan, On 09/15/2017 01:15 PM, Jan Beulich wrote: On 14.09.17 at 18:49, wrote: get_page_from_gfn will be able to get reference on foreign page and as per my understanding will allow to grant page on foreign memory. This was not allowed with a simple get_page(...) on

Re: [Xen-devel] [PATCH 09/12] arm/decode.c: switch to plain bool

2017-09-15 Thread Julien Grall
On 09/15/2017 03:39 PM, Wei Liu wrote: On Fri, Sep 15, 2017 at 03:33:27PM +0100, Julien Grall wrote: Hi Wei, On 09/15/2017 10:42 AM, Wei Liu wrote: Signed-off-by: Wei Liu --- xen/arch/arm/decode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

  1   2   >