Re: [Xen-devel] [PATCH] xen-blkfront: fix mq start/stop race

2017-06-22 Thread Junxiao Bi
Hi Boris & Juergen, Could you help review this patch? This is a race and will cause the io hung. Thanks, Junxiao. On 06/22/2017 09:36 AM, Junxiao Bi wrote: > When ring buf full, hw queue will be stopped. While blkif interrupt consume > request and make free space in ring buf, hw queue will be

Re: [Xen-devel] [PATCH v3 3/3] VT-d PI: restrict the vcpu number on a given pcpu

2017-06-22 Thread Chao Gao
On Fri, Jun 16, 2017 at 09:09:13AM -0600, Jan Beulich wrote: On 24.05.17 at 08:56, wrote: >> Currently, a blocked vCPU is put in its pCPU's pi blocking list. If >> too many vCPUs are blocked on a given pCPU, it will incur that the list >> grows too long. After a simple

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

2017-06-22 Thread osstest service owner
flight 110950 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/110950/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-ovmf-amd64 14 guest-saverestore.2 fail REGR. vs. 110515

Re: [Xen-devel] [PATCH for-4.9 v3 3/3] xen/livepatch: Don't crash on encountering STN_UNDEF relocations

2017-06-22 Thread Konrad Rzeszutek Wilk
On Thu, Jun 22, 2017 at 07:15:29PM +0100, Andrew Cooper wrote: > A symndx of STN_UNDEF is special, and means a symbol value of 0. While > legitimate in the ELF standard, its existance in a livepatch is questionable > at best. Until a plausible usecase presents itself, reject such a relocation >

Re: [Xen-devel] [PATCH for-4.9 v3 2/3] xen/livepatch: Use zeroed memory allocations for arrays

2017-06-22 Thread Konrad Rzeszutek Wilk
On Thu, Jun 22, 2017 at 07:15:28PM +0100, Andrew Cooper wrote: > Each of these arrays is sparse. Use zeroed allocations to cause uninitialised > array elements to contain deterministic values, most importantly for the > embedded pointers. > > Signed-off-by: Andrew Cooper

Re: [Xen-devel] [PATCH] xen: Replace ASSERT(0) with ASSERT_UNREACHABLE()

2017-06-22 Thread Konrad Rzeszutek Wilk
On Wed, Jun 21, 2017 at 01:40:45PM +0100, Andrew Cooper wrote: > No functional change, but the result is more informative both in the code and > error messages if the assertions do get hit. > > Signed-off-by: Andrew Cooper > --- > CC: Jan Beulich >

Re: [Xen-devel] Travis build failing because "tools/xen-detect: try sysfs node for obtaining guest type" ?

2017-06-22 Thread Konrad Rzeszutek Wilk
On Thu, Jun 22, 2017 at 07:31:53PM +0200, Dario Faggioli wrote: > Hey, > > Am I the only one for which Travis seems to be unhappy of this: Nope. I saw it too ,but then figured there was some patch from Olaf for this?. > > I/home/travis/build/fdario/xen/tools/misc/../../tools/include >

[Xen-devel] [xen-4.8-testing test] 110946: tolerable FAIL - PUSHED

2017-06-22 Thread osstest service owner
flight 110946 xen-4.8-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/110946/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-amd64-i386-xl-qemut-win7-amd64 16 guest-stopfail REGR. vs. 110437

Re: [Xen-devel] [PATCH 14/17 v5] xen/arm: vpl011: Add support for vuart console in xenconsole

2017-06-22 Thread Stefano Stabellini
On Thu, 22 Jun 2017, Bhupinder Thakur wrote: > This patch finally adds the support for vuart console. > > Signed-off-by: Bhupinder Thakur > --- > CC: Ian Jackson > CC: Wei Liu > CC: Stefano Stabellini

Re: [Xen-devel] [PATCH 13/17 v5] xen/arm: vpl011: Modify xenconsole to support multiple consoles

2017-06-22 Thread Stefano Stabellini
On Thu, 22 Jun 2017, Bhupinder Thakur wrote: > This patch adds the support for multiple consoles and introduces the iterator > functions to operate on multiple consoles. > > This patch is in preparation to support a new vuart console. > > Signed-off-by: Bhupinder Thakur

Re: [Xen-devel] [PATCH 11/17 v5] xen/arm: vpl011: Rename the console structure field conspath to xspath

2017-06-22 Thread Stefano Stabellini
On Thu, 22 Jun 2017, Bhupinder Thakur wrote: > The console->conspath name is changed to console->xspath as it is > clear from the name that it is referring to xenstore path. > > Signed-off-by: Bhupinder Thakur Reviewed-by: Stefano Stabellini

Re: [Xen-devel] [PATCH 10/17 v5] xen/arm: vpl011: Modify xenconsole to define and use a new console structure

2017-06-22 Thread Stefano Stabellini
On Thu, 22 Jun 2017, Bhupinder Thakur wrote: > Xenconsole uses a domain structure which contains console specific fields. > This > patch defines a new console structure, which would be used by the xenconsole > functions to perform console specific operations like reading/writing data > from/to >

Re: [Xen-devel] [PATCH 15/17 v5] xen/arm: vpl011: Add a new vuart console type to xenconsole client

2017-06-22 Thread Stefano Stabellini
On Thu, 22 Jun 2017, Bhupinder Thakur wrote: > Add a new console type VUART to connect to guest's emualated vuart > console. > > Signed-off-by: Bhupinder Thakur Reviewed-by: Stefano Stabellini > --- > CC: Ian Jackson

Re: [Xen-devel] [PATCH 09/17 v5] xen/arm: vpl011: Add a new vuart node in the xenstore

2017-06-22 Thread Stefano Stabellini
On Thu, 22 Jun 2017, Bhupinder Thakur wrote: > Add a new vuart console node to xenstore. This node is added at > > /local/domain/$DOMID/vuart/0. > > The node contains information such as the ring-ref, event channel, > buffer limit and type of console. > > Xenconsole reads the node information

Re: [Xen-devel] [PATCH 08/17 v5] xen/arm: vpl011: Add a new domctl API to initialize vpl011

2017-06-22 Thread Stefano Stabellini
On Thu, 22 Jun 2017, Bhupinder Thakur wrote: > Add a new domctl API to initialize vpl011. It takes the GFN and console > backend domid as input and returns an event channel to be used for > sending and receiving events from Xen. > > Xen will communicate with xenconsole using GFN as the ring

Re: [Xen-devel] [PATCH 07/17 v5] xen/arm: vpl011: Rearrange xen header includes in alphabetical order in domctl.c

2017-06-22 Thread Stefano Stabellini
On Thu, 22 Jun 2017, Bhupinder Thakur wrote: > Rearrange xen header includes in alphabetical order in domctl.c. > > Signed-off-by: Bhupinder Thakur Reviewed-by: Stefano Stabellini > --- > CC: Stefano Stabellini >

Re: [Xen-devel] [PATCH 06/17 v5] xen/arm: vpl011: Add support for vuart in libxl

2017-06-22 Thread Stefano Stabellini
On Thu, 22 Jun 2017, Bhupinder Thakur wrote: > An option is provided in libxl to enable/disable sbsa vuart while > creating a guest domain. > > Libxl now suppots a generic vuart console and sbsa uart is a specific type. > In future support can be added for multiple vuart of different types. > >

Re: [Xen-devel] [PATCH 04/17 v5] xen/arm: vpl011: Add SBSA UART emulation in Xen

2017-06-22 Thread Stefano Stabellini
On Thu, 22 Jun 2017, Bhupinder Thakur wrote: > Add emulation code to emulate read/write access to pl011 registers > and pl011 interrupts: > > - Emulate DR read/write by reading and writing from/to the IN > and OUT ring buffers and raising an event to the backend when > there is

Re: [Xen-devel] [PATCH 03/17 v5] xen/arm: vpl011: Define common ring buffer helper functions in console.h

2017-06-22 Thread Stefano Stabellini
On Thu, 22 Jun 2017, Bhupinder Thakur wrote: > DEFINE_XEN_FLEX_RING(xencons) defines common helper functions such as > xencons_queued() to tell the current size of the ring buffer, > xencons_mask() to mask off the index, which are useful helper functions. > pl011 emulation code will use these

Re: [Xen-devel] [PATCH v2 3/3] xen-disk: use an IOThread per instance

2017-06-22 Thread Stefano Stabellini
CC'ing Andreas Färber. Could you please give a quick look below at the way the iothread object is instantiate and destroyed? I am no object model expert and would appreaciate a second opinion. On Wed, 21 Jun 2017, Paul Durrant wrote: > This patch allocates an IOThread object for each xen_disk

Re: [Xen-devel] new dma-mapping tree, was Re: clean up and modularize arch dma_mapping interface V2

2017-06-22 Thread Stephen Rothwell
Hi all, On Wed, 21 Jun 2017 15:32:39 +0200 Marek Szyprowski wrote: > > On 2017-06-20 15:16, Christoph Hellwig wrote: > > On Tue, Jun 20, 2017 at 11:04:00PM +1000, Stephen Rothwell wrote: > >>

[Xen-devel] [xen-4.7-testing test] 110944: tolerable FAIL - PUSHED

2017-06-22 Thread osstest service owner
flight 110944 xen-4.7-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/110944/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armhf-armhf-xl 3 host-install(3) broken in 110902 pass in 110944 test-xtf-amd64-amd64-2 45

Re: [Xen-devel] [PATCH for-4.9 v3 3/3] xen/livepatch: Don't crash on encountering STN_UNDEF relocations

2017-06-22 Thread Stefano Stabellini
On Thu, 22 Jun 2017, Andrew Cooper wrote: > A symndx of STN_UNDEF is special, and means a symbol value of 0. While > legitimate in the ELF standard, its existance in a livepatch is questionable > at best. Until a plausible usecase presents itself, reject such a relocation > with -EOPNOTSUPP. >

Re: [Xen-devel] [RFC v2]Proposal to allow setting up shared memory areas between VMs from xl config file

2017-06-22 Thread Stefano Stabellini
On Wed, 21 Jun 2017, Zhongze Liu wrote: > > 1. Motivation and Description > > Virtual machines use grant table hypercalls to setup a share page for > inter-VMs communications. These hypercalls

Re: [Xen-devel] [RFC v2]Proposal to allow setting up shared memory areas between VMs from xl config file

2017-06-22 Thread Stefano Stabellini
On Fri, 23 Jun 2017, Zhongze Liu wrote: > Hi Julien, > > 2017-06-21 1:29 GMT+08:00 Julien Grall : > > Hi, > > > > Thank you for the new proposal. > > > > On 06/20/2017 06:18 PM, Zhongze Liu wrote: > >> > >> In the example above. A memory area ID1 will be shared between vm1

Re: [Xen-devel] [PATCH] passthrough: give XEN_DOMCTL_test_assign_device more sane semantics

2017-06-22 Thread Daniel De Graaf
On 06/22/2017 05:40 AM, George Dunlap wrote: On 22/06/17 08:05, Jan Beulich wrote: On 21.06.17 at 18:36, wrote: On 21/06/17 16:59, Jan Beulich wrote: On 21.06.17 at 16:38, wrote: On 21/06/17 11:08, Jan Beulich wrote: So far callers of

Re: [Xen-devel] [PATCH v2 2/2] x86/xen/efi: Init only efi struct members used by Xen

2017-06-22 Thread Boris Ostrovsky
On 06/22/2017 06:51 AM, Daniel Kiper wrote: > Current approach, wholesale efi struct initialization from efi_xen, is not > good. Usually if new member is defined then it is properly initialized in > drivers/firmware/efi/efi.c but not in arch/x86/xen/efi.c. As I saw it happened > a few times until

[Xen-devel] [xen-4.9-testing test] 110942: regressions - FAIL

2017-06-22 Thread osstest service owner
flight 110942 xen-4.9-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/110942/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-credit2 15 guest-start/debian.repeat fail REGR. vs. 110542

[Xen-devel] [PATCH v5 17/18] xen/pvcalls: implement write

2017-06-22 Thread Stefano Stabellini
When the other end notifies us that there is data to be written (pvcalls_back_conn_event), increment the io and write counters, and schedule the ioworker. Implement the write function called by ioworker by reading the data from the data ring, writing it to the socket by calling inet_sendmsg. Set

[Xen-devel] [PATCH v5 07/18] xen/pvcalls: implement socket command

2017-06-22 Thread Stefano Stabellini
Just reply with success to the other end for now. Delay the allocation of the actual socket to bind and/or connect. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky CC: boris.ostrov...@oracle.com CC: jgr...@suse.com ---

[Xen-devel] [PATCH v5 16/18] xen/pvcalls: implement read

2017-06-22 Thread Stefano Stabellini
When an active socket has data available, increment the io and read counters, and schedule the ioworker. Implement the read function by reading from the socket, writing the data to the data ring. Set in_error on error. Signed-off-by: Stefano Stabellini CC:

[Xen-devel] [PATCH v5 04/18] xen/pvcalls: xenbus state handling

2017-06-22 Thread Stefano Stabellini
Introduce the code to handle xenbus state changes. Implement the probe function for the pvcalls backend. Write the supported versions, max-page-order and function-calls nodes to xenstore, as required by the protocol. Introduce stub functions for disconnecting/connecting to a frontend.

[Xen-devel] [PATCH v5 06/18] xen/pvcalls: handle commands from the frontend

2017-06-22 Thread Stefano Stabellini
When the other end notifies us that there are commands to be read (pvcalls_back_event), wake up the backend thread to parse the command. The command ring works like most other Xen rings, so use the usual ring macros to read and write to it. The functions implementing the commands are empty stubs

[Xen-devel] [PATCH v5 15/18] xen/pvcalls: implement the ioworker functions

2017-06-22 Thread Stefano Stabellini
We have one ioworker per socket. Each ioworker goes through the list of outstanding read/write requests. Once all requests have been dealt with, it returns. We use one atomic counter per socket for "read" operations and one for "write" operations to keep track of the reads/writes to do. We also

[Xen-devel] [PATCH v5 14/18] xen/pvcalls: disconnect and module_exit

2017-06-22 Thread Stefano Stabellini
Implement backend_disconnect. Call pvcalls_back_release_active on active sockets and pvcalls_back_release_passive on passive sockets. Implement module_exit by calling backend_disconnect on frontend connections. Signed-off-by: Stefano Stabellini CC:

[Xen-devel] [PATCH v5 18/18] xen: introduce a Kconfig option to enable the pvcalls backend

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

[Xen-devel] [PATCH v5 11/18] xen/pvcalls: implement accept command

2017-06-22 Thread Stefano Stabellini
Implement the accept command by calling inet_accept. To avoid blocking in the kernel, call inet_accept(O_NONBLOCK) from a workqueue, which get scheduled on sk_data_ready (for a passive socket, it means that there are connections to accept). Use the reqcopy field to store the request. Accept the

[Xen-devel] [PATCH v5 05/18] xen/pvcalls: connect to a frontend

2017-06-22 Thread Stefano Stabellini
Introduce a per-frontend data structure named pvcalls_fedata. It contains pointers to the command ring, its event channel, a list of active sockets and a tree of passive sockets (passing sockets need to be looked up from the id on listen, accept and poll commands, while active sockets only on

[Xen-devel] [PATCH v5 01/18] xen: introduce the pvcalls interface header

2017-06-22 Thread Stefano Stabellini
Introduce the C header file which defines the PV Calls interface. It is imported from xen/include/public/io/pvcalls.h. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky CC: konrad.w...@oracle.com CC: boris.ostrov...@oracle.com CC:

[Xen-devel] [PATCH v5 08/18] xen/pvcalls: implement connect command

2017-06-22 Thread Stefano Stabellini
Allocate a socket. Keep track of socket <-> ring mappings with a new data structure, called sock_mapping. Implement the connect command by calling inet_stream_connect, and mapping the new indexes page and data ring. Allocate a workqueue and a work_struct, called ioworker, to perform reads and

[Xen-devel] [PATCH v5 13/18] xen/pvcalls: implement release command

2017-06-22 Thread Stefano Stabellini
Release both active and passive sockets. For active sockets, make sure to avoid possible conflicts with the ioworker reading/writing to those sockets concurrently. Set map->release to let the ioworker know atomically that the socket will be released soon, then wait until the ioworker finishes

[Xen-devel] [PATCH v5 12/18] xen/pvcalls: implement poll command

2017-06-22 Thread Stefano Stabellini
Implement poll on passive sockets by requesting a delayed response with mappass->reqcopy, and reply back when there is data on the passive socket. Poll on active socket is unimplemented as by the spec, as the frontend should just wait for events and check the indexes on the indexes page. Only

[Xen-devel] [PATCH v5 02/18] xen/pvcalls: introduce the pvcalls xenbus backend

2017-06-22 Thread Stefano Stabellini
Introduce a xenbus backend 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 v5 03/18] xen/pvcalls: initialize the module and register the xenbus backend

2017-06-22 Thread Stefano Stabellini
Keep a list of connected frontends. Use a semaphore to protect list accesses. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky CC: boris.ostrov...@oracle.com CC: jgr...@suse.com --- drivers/xen/pvcalls-back.c | 22

[Xen-devel] [PATCH v5 09/18] xen/pvcalls: implement bind command

2017-06-22 Thread Stefano Stabellini
Allocate a socket. Track the allocated passive sockets with a new data structure named sockpass_mapping. It contains an unbound workqueue to schedule delayed work for the accept and poll commands. It also has a reqcopy field to be used to store a copy of a request for delayed work. Reads/writes to

[Xen-devel] [PATCH v5 10/18] xen/pvcalls: implement listen command

2017-06-22 Thread Stefano Stabellini
Call inet_listen to implement the listen command. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky CC: boris.ostrov...@oracle.com CC: jgr...@suse.com --- drivers/xen/pvcalls-back.c | 21 + 1 file changed, 21

[Xen-devel] [PATCH v5 00/18] introduce the Xen PV Calls backend

2017-06-22 Thread Stefano Stabellini
Hi all, this series introduces the backend 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 for-4.8] x86/pv: Fix the handling of `int $x` for vectors which alias exceptions

2017-06-22 Thread Andrew Cooper
The claim at the top of c/s 2e426d6eecf "x86/traps: Drop use_error_code parameter from do_{,guest_}trap()" is only actually true for hardware exceptions. It is not true for `int $x` instructions (which never push error code), irrespective of whether the vector aliases an exception or not.

[Xen-devel] [PATCH v5 4/8] mm: Scrub memory from idle loop

2017-06-22 Thread Boris Ostrovsky
Instead of scrubbing pages during guest destruction (from free_heap_pages()) do this opportunistically, from the idle loop. We might come to scrub_free_pages()from idle loop while another CPU uses mapcache override, resulting in a fault while trying to do __map_domain_page() in scrub_one_page().

[Xen-devel] [PATCH v5 0/8] Memory scrubbing from idle loop

2017-06-22 Thread Boris Ostrovsky
Changes in v5: * Make page_info.u.free and union and use bitfields there. * Bug fixes (see per-patch notes) When a domain is destroyed the hypervisor must scrub domain's pages before giving them to another guest in order to prevent leaking the deceased guest's data. Currently this is done during

[Xen-devel] [PATCH v5 3/8] mm: Scrub pages in alloc_heap_pages() if needed

2017-06-22 Thread Boris Ostrovsky
When allocating pages in alloc_heap_pages() first look for clean pages. If none is found then retry, take pages marked as unscrubbed and scrub them. Note that we shouldn't find unscrubbed pages in alloc_heap_pages() yet. However, this will become possible when we stop scrubbing from

[Xen-devel] [PATCH v5 7/8] mm: Print number of unscrubbed pages in 'H' debug handler

2017-06-22 Thread Boris Ostrovsky
Signed-off-by: Boris Ostrovsky Reviewed-by: Wei Liu --- xen/common/page_alloc.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index f0e5399..da5ffc2 100644 ---

Re: [Xen-devel] [RFC v2]Proposal to allow setting up shared memory areas between VMs from xl config file

2017-06-22 Thread Zhongze Liu
Hi, After talking to Stefano, I know that there seem to be no such hypercalls to restrict the W/R/X permissions on the shared backing pages (XENMEM_access_op is for another purpose, sorry for getting its usage wrong). And it seems that the ability to specify these permissions is not strictly

[Xen-devel] [PATCH v5 5/8] spinlock: Introduce spin_lock_cb()

2017-06-22 Thread Boris Ostrovsky
While waiting for a lock we may want to periodically run some code. This code may, for example, allow the caller to release resources held by it that are no longer needed in the critical section protected by the lock. Specifically, this feature will be needed by scrubbing code where the scrubber,

[Xen-devel] [PATCH v5 6/8] mm: Keep heap accessible to others while scrubbing

2017-06-22 Thread Boris Ostrovsky
Instead of scrubbing pages while holding heap lock we can mark buddy's head as being scrubbed and drop the lock temporarily. If someone (most likely alloc_heap_pages()) tries to access this chunk it will signal the scrubber to abort scrub by setting head's BUDDY_SCRUB_ABORT bit. The scrubber

[Xen-devel] [PATCH v5 2/8] mm: Extract allocation loop from alloc_heap_pages()

2017-06-22 Thread Boris Ostrovsky
This will make code a bit more readable, especially with changes that will be introduced in subsequent patches. Signed-off-by: Boris Ostrovsky --- Changes in v5: * Constified get_free_buddy()'s struct domain argument * Dropped request local variable in

[Xen-devel] [PATCH v5 8/8] mm: Make sure pages are scrubbed

2017-06-22 Thread Boris Ostrovsky
Add a debug Kconfig option that will make page allocator verify that pages that were supposed to be scrubbed are, in fact, clean. Signed-off-by: Boris Ostrovsky --- Changes in v5: * Defined SCRUB_PATTERN for NDEBUG * Style chages xen/Kconfig.debug | 7 ++

[Xen-devel] [PATCH v5 1/8] mm: Place unscrubbed pages at the end of pagelist

2017-06-22 Thread Boris Ostrovsky
. so that it's easy to find pages that need to be scrubbed (those pages are now marked with _PGC_need_scrub bit). We keep track of the first unscrubbed page in a page buddy using first_dirty field. For now it can have two values, 0 (whole buddy needs scrubbing) or INVALID_DIRTY_IDX (the buddy

Re: [Xen-devel] [PATCH] xen/disk: don't leak stack data via response ring

2017-06-22 Thread Stefano Stabellini
On Thu, 22 Jun 2017, Jan Beulich wrote: > >>> On 21.06.17 at 20:46, wrote: > > On Wed, 21 Jun 2017, Jan Beulich wrote: > >> >>> On 20.06.17 at 23:48, wrote: > >> > On Tue, 20 Jun 2017, Jan Beulich wrote: > >> >> @@ -36,13 +33,7 @@ struct

Re: [Xen-devel] [PATCH v4 07/18] xen/pvcalls: implement socket command

2017-06-22 Thread Stefano Stabellini
On Thu, 22 Jun 2017, Andrew Cooper wrote: > On 22/06/17 19:29, Stefano Stabellini wrote: > > On Thu, 22 Jun 2017, Roger Pau Monné wrote: > >> On Wed, Jun 21, 2017 at 01:16:56PM -0700, Stefano Stabellini wrote: > >>> On Tue, 20 Jun 2017, Roger Pau Monné wrote: > On Thu, Jun 15, 2017 at

Re: [Xen-devel] [PATCH v4 07/18] xen/pvcalls: implement socket command

2017-06-22 Thread Andrew Cooper
On 22/06/17 19:29, Stefano Stabellini wrote: > On Thu, 22 Jun 2017, Roger Pau Monné wrote: >> On Wed, Jun 21, 2017 at 01:16:56PM -0700, Stefano Stabellini wrote: >>> On Tue, 20 Jun 2017, Roger Pau Monné wrote: On Thu, Jun 15, 2017 at 12:09:36PM -0700, Stefano Stabellini wrote: > Just

Re: [Xen-devel] [PATCH v2 01/16] xen/mm: Don't use _{g, m}fn for defining INVALID_{G, M}FN

2017-06-22 Thread Julien Grall
Hi, On 20/06/17 11:32, Jan Beulich wrote: On 20.06.17 at 12:06, wrote: At 03:36 -0600 on 20 Jun (1497929778), Jan Beulich wrote: On 20.06.17 at 11:14, wrote: At 01:32 -0600 on 20 Jun (1497922345), Jan Beulich wrote: On 19.06.17 at 18:57,

Re: [Xen-devel] [PATCH v4 07/18] xen/pvcalls: implement socket command

2017-06-22 Thread Stefano Stabellini
On Thu, 22 Jun 2017, Roger Pau Monné wrote: > On Wed, Jun 21, 2017 at 01:16:56PM -0700, Stefano Stabellini wrote: > > On Tue, 20 Jun 2017, Roger Pau Monné wrote: > > > On Thu, Jun 15, 2017 at 12:09:36PM -0700, Stefano Stabellini wrote: > > > > Just reply with success to the other end for now.

[Xen-devel] [PATCH for-4.9 v3 1/3] xen/livepatch: Clean up arch relocation handling

2017-06-22 Thread Andrew Cooper
* Reduce symbol scope and initalisation as much as possible * Annotate a fallthrough case in arm64 * Fix switch statement style in arm32 No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich Reviewed-by: Konrad Rzeszutek

[Xen-devel] [PATCH for-4.9 v3 0/3] Fixes for livepatching

2017-06-22 Thread Andrew Cooper
Andrew Cooper (3): xen/livepatch: Clean up arch relocation handling xen/livepatch: Use zeroed memory allocations for arrays xen/livepatch: Don't crash on encountering STN_UNDEF relocations xen/arch/arm/arm32/livepatch.c | 41 +

[Xen-devel] [PATCH for-4.9 v3 2/3] xen/livepatch: Use zeroed memory allocations for arrays

2017-06-22 Thread Andrew Cooper
Each of these arrays is sparse. Use zeroed allocations to cause uninitialised array elements to contain deterministic values, most importantly for the embedded pointers. Signed-off-by: Andrew Cooper --- CC: Konrad Rzeszutek Wilk CC: Ross

[Xen-devel] [PATCH for-4.9 v3 3/3] xen/livepatch: Don't crash on encountering STN_UNDEF relocations

2017-06-22 Thread Andrew Cooper
A symndx of STN_UNDEF is special, and means a symbol value of 0. While legitimate in the ELF standard, its existance in a livepatch is questionable at best. Until a plausible usecase presents itself, reject such a relocation with -EOPNOTSUPP. Additionally, fix an off-by-one error while range

Re: [Xen-devel] [PATCH v2] VT-d: fix VF of RC integrated endpoint matched to wrong VT-d unit

2017-06-22 Thread Venu Busireddy
On 2017-06-22 11:52:50 -0400, Konrad Rzeszutek Wilk wrote: > On Thu, Jun 22, 2017 at 09:31:50AM -0600, Jan Beulich wrote: > > >>> On 22.06.17 at 16:21, wrote: > > > On Thu, Jun 22, 2017 at 03:26:04AM -0600, Jan Beulich wrote: > > > On 21.06.17 at 12:47,

[Xen-devel] [xen-unstable-smoke test] 110976: tolerable trouble: broken/pass - PUSHED

2017-06-22 Thread osstest service owner
flight 110976 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/110976/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-arm64-arm64-xl-xsm 1 build-check(1) blocked n/a test-amd64-amd64-libvirt 12

[Xen-devel] Xen 4.9 rc9

2017-06-22 Thread Julien Grall
Hi all, Xen 4.9 rc8 is tagged. You can check that out from xen.git: git://xenbits.xen.org/xen.git 4.9.0-rc9 For your convenience there is also a tarball at: https://downloads.xenproject.org/release/xen/4.9.0-rc9/xen-4.9.0-rc9.tar.gz And the signature is at:

[Xen-devel] Travis build failing because "tools/xen-detect: try sysfs node for obtaining guest type" ?

2017-06-22 Thread Dario Faggioli
Hey, Am I the only one for which Travis seems to be unhappy of this: I/home/travis/build/fdario/xen/tools/misc/../../tools/include xen-detect.c -o xen-detect xen-detect.c: In function ‘check_sysfs’: xen-detect.c:196:17: error: ignoring return value of ‘asprintf’, declared with attribute

Re: [Xen-devel] [RFC v2]Proposal to allow setting up shared memory areas between VMs from xl config file

2017-06-22 Thread Zhongze Liu
Hi Wei, Thank you for your valuable comments. 2017-06-21 23:09 GMT+08:00 Wei Liu : > On Wed, Jun 21, 2017 at 01:18:38AM +0800, Zhongze Liu wrote: >> >> 1. Motivation and Description >>

Re: [Xen-devel] [PATCH v3 5/9] xen/vpci: add handlers to map the BARs

2017-06-22 Thread Roger Pau Monne
On Fri, May 19, 2017 at 09:21:56AM -0600, Jan Beulich wrote: > >>> On 27.04.17 at 16:35, wrote: > > +static int vpci_modify_bars(struct pci_dev *pdev, const bool map) > > +{ > > +struct vpci_header *header = >vpci->header; > > +unsigned int i; > > +int rc = 0; >

Re: [Xen-devel] [PATCH for-4.9 v2] xen/livepatch: Don't crash on encountering STN_UNDEF relocations

2017-06-22 Thread Konrad Rzeszutek Wilk
On Thu, Jun 22, 2017 at 12:33:57PM -0400, Konrad Rzeszutek Wilk wrote: > On Thu, Jun 22, 2017 at 12:10:46PM -0400, Konrad Rzeszutek Wilk wrote: > > On Thu, Jun 22, 2017 at 11:27:50AM -0400, Konrad Rzeszutek Wilk wrote: > > > On Wed, Jun 21, 2017 at 09:26:15PM -0400, Konrad Rzeszutek Wilk wrote: >

Re: [Xen-devel] [RFC v2]Proposal to allow setting up shared memory areas between VMs from xl config file

2017-06-22 Thread Zhongze Liu
Hi Julien, 2017-06-21 1:29 GMT+08:00 Julien Grall : > Hi, > > Thank you for the new proposal. > > On 06/20/2017 06:18 PM, Zhongze Liu wrote: >> >> In the example above. A memory area ID1 will be shared between vm1 and >> vm2. >> This area will be taken from vm1 and mapped

Re: [Xen-devel] [PATCH 1/4] xen: credit2: implement utilization cap

2017-06-22 Thread George Dunlap
On 08/06/17 13:08, Dario Faggioli wrote: > This commit implements the Xen part of the cap mechanism for > Credit2. > > A cap is how much, in terms of % of physical CPU time, a domain > can execute at most. > > For instance, a domain that must not use more than 1/4 of one > physical CPU, must

Re: [Xen-devel] [PATCH v7 27/36] iommu/amd: Allow the AMD IOMMU to work with memory encryption

2017-06-22 Thread Tom Lendacky
On 6/22/2017 5:56 AM, Borislav Petkov wrote: On Fri, Jun 16, 2017 at 01:54:59PM -0500, Tom Lendacky wrote: The IOMMU is programmed with physical addresses for the various tables and buffers that are used to communicate between the device and the driver. When the driver allocates this memory it

[Xen-devel] [PATCH v3] libxc: add xc_domain_add_to_physmap_batch to wrap XENMEM_add_to_physmap_batch

2017-06-22 Thread Zhongze Liu
This is a preparation for the proposal "allow setting up shared memory areas between VMs from xl config file". See: V2: https://lists.xen.org/archives/html/xen-devel/2017-06/msg02256.html V1: https://lists.xen.org/archives/html/xen-devel/2017-05/msg01288.html The plan is to use

Re: [Xen-devel] [PATCH for-4.9 v2] xen/livepatch: Don't crash on encountering STN_UNDEF relocations

2017-06-22 Thread Konrad Rzeszutek Wilk
On Thu, Jun 22, 2017 at 12:10:46PM -0400, Konrad Rzeszutek Wilk wrote: > On Thu, Jun 22, 2017 at 11:27:50AM -0400, Konrad Rzeszutek Wilk wrote: > > On Wed, Jun 21, 2017 at 09:26:15PM -0400, Konrad Rzeszutek Wilk wrote: > > > On Wed, Jun 21, 2017 at 07:13:36PM +0100, Andrew Cooper wrote: > > > > A

Re: [Xen-devel] [PATCH 1/2] arm: smccc: handle SMCs/HVCs according to SMCCC

2017-06-22 Thread Volodymyr Babchuk
Hi Julien, On 15.06.17 13:48, Julien Grall wrote: Hi Volodymyr, On 14/06/17 15:10, Volodymyr Babchuk wrote: SMCCC (SMC Call Convention) describes how to handle both HVCs and SMCs. SMCCC states that both HVC and SMC are valid conduits to call to a different firmware functions. Thus, for

[Xen-devel] [PATCH v2 3/4] arm: traps: handle PSCI calls inside `vsmc.c`

2017-06-22 Thread Volodymyr Babchuk
PSCI is part of HVC/SMC interface, so it should be handled in appropriate place: `vsmc.c`. This patch just moves PSCI handler calls from `traps.c` to `vsmc.c`. PSCI is considered as two different "services" in terms of SMCCC. Older PSCI 1.0 is treated as "architecture service", while never PSCI

[Xen-devel] [PATCH v2 1/4] arm: traps: psci: use generic register accessors

2017-06-22 Thread Volodymyr Babchuk
There are standard functions set_user_reg() and get_user_reg(). Use them instead of PSCI_RESULT_REG()/PSCI_ARG() macros. Signed-off-by: Volodymyr Babchuk --- xen/arch/arm/traps.c | 68 ++-- 1 file changed, 29

[Xen-devel] [PATCH v2 0/4] Handle SMCs and HVCs in conformance with SMCCC

2017-06-22 Thread Volodymyr Babchuk
Hello all, This is second version. Instead of 2 patches, there are 4 now. I have divided PSCI patch into two: one changes how PSCI code accesses registers and second one moves PSCI code with new accessors to vsmc.c. Also I had removed redundant 64 bit mode check in PSCI code, as it does not

[Xen-devel] [PATCH v2 4/4] vsmc: psci: remove 64 bit mode check

2017-06-22 Thread Volodymyr Babchuk
PSCI handling code had helper routine that checked calling convention. It does not needed anymore, because: - Generic handler checks that 64 bit calls can be made only by 64 bit guests. - SMCCC requires that 64-bit handler should support both 32 and 64 bit calls even if they originate

[Xen-devel] [PATCH v2 2/4] arm: smccc: handle SMCs/HVCs according to SMCCC

2017-06-22 Thread Volodymyr Babchuk
SMCCC (SMC Call Convention) describes how to handle both HVCs and SMCs. SMCCC states that both HVC and SMC are valid conduits to call to a different firmware functions. Thus, for example PSCI calls can be made both by SMC or HVC. Also SMCCC defines function number coding for such calls. Besides

[Xen-devel] [qemu-upstream-4.9-testing test] 110939: tolerable FAIL - PUSHED

2017-06-22 Thread osstest service owner
flight 110939 qemu-upstream-4.9-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/110939/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-amd64-amd64-xl-qemuu-win7-amd64 16 guest-stop fail REGR. vs. 109926

Re: [Xen-devel] [PATCH for-4.9 v2] xen/livepatch: Don't crash on encountering STN_UNDEF relocations

2017-06-22 Thread Konrad Rzeszutek Wilk
On Thu, Jun 22, 2017 at 11:27:50AM -0400, Konrad Rzeszutek Wilk wrote: > On Wed, Jun 21, 2017 at 09:26:15PM -0400, Konrad Rzeszutek Wilk wrote: > > On Wed, Jun 21, 2017 at 07:13:36PM +0100, Andrew Cooper wrote: > > > A symndx of STN_UNDEF is special, and means a symbol value of 0. While > > >

Re: [Xen-devel] [PATCH v2] libxc: add xc_domain_add_to_physmap_batch to wrap XENMEM_add_to_physmap_batch

2017-06-22 Thread Zhongze Liu
Hi Wei, 2017-06-21 23:44 GMT+08:00 Wei Liu : > On Wed, Jun 21, 2017 at 01:29:26AM +0800, Zhongze Liu wrote: >> This is a preparation for the proposal "allow setting up shared memory areas >> between VMs from xl config file". See: >> V2:

Re: [Xen-devel] [PATCH 2/2] x86/altp2m: Add a hvmop for setting the suppress #VE bit

2017-06-22 Thread Adrian Pop
On Thu, Jun 22, 2017 at 06:13:22AM -0600, Jan Beulich wrote: > >>> On 22.06.17 at 14:04, wrote: > > On Fri, Jun 16, 2017 at 02:39:10AM -0600, Jan Beulich wrote: > >> >>> On 15.06.17 at 21:01, wrote: > >> > On Fri, Jun 9, 2017 at 10:51 AM, Adrian Pop

Re: [Xen-devel] [PATCH v2] VT-d: fix VF of RC integrated endpoint matched to wrong VT-d unit

2017-06-22 Thread Konrad Rzeszutek Wilk
On Thu, Jun 22, 2017 at 09:31:50AM -0600, Jan Beulich wrote: > >>> On 22.06.17 at 16:21, wrote: > > On Thu, Jun 22, 2017 at 03:26:04AM -0600, Jan Beulich wrote: > > On 21.06.17 at 12:47, wrote: > >>> The problem is a VF of RC integrated PF (e.g. PF's

Re: [Xen-devel] [PATCH] mini-os: use gzip -n

2017-06-22 Thread Wei Liu
On Thu, Jun 22, 2017 at 03:55:21PM +0100, Andrew Cooper wrote: > On 22/06/17 15:09, Wei Liu wrote: > > Cc minios-devel and Samuel > > > > On Thu, Jun 22, 2017 at 03:40:26PM +0200, Bernhard M. Wiedemann wrote: > >> to not add current timestamp to > >> ioemu-stubdom.gz > >> pv-grub-x86_32.gz > >>

Re: [Xen-devel] [PATCH v2] VT-d: fix VF of RC integrated endpoint matched to wrong VT-d unit

2017-06-22 Thread Jan Beulich
>>> On 22.06.17 at 16:21, wrote: > On Thu, Jun 22, 2017 at 03:26:04AM -0600, Jan Beulich wrote: > On 21.06.17 at 12:47, wrote: >>> The problem is a VF of RC integrated PF (e.g. PF's BDF is 00:02.0), >>> we would wrongly use 00:00.0 to search VT-d unit.

Re: [Xen-devel] [PATCH for-4.9 v2] xen/livepatch: Don't crash on encountering STN_UNDEF relocations

2017-06-22 Thread Konrad Rzeszutek Wilk
On Wed, Jun 21, 2017 at 09:26:15PM -0400, Konrad Rzeszutek Wilk wrote: > On Wed, Jun 21, 2017 at 07:13:36PM +0100, Andrew Cooper wrote: > > A symndx of STN_UNDEF is special, and means a symbol value of 0. While > > legitimate in the ELF standard, its existance in a livepatch is questionable > >

[Xen-devel] [qemu-upstream-unstable test] 110938: regressions - FAIL

2017-06-22 Thread osstest service owner
flight 110938 qemu-upstream-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/110938/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-win7-amd64 15 guest-localmigrate/x10 fail REGR. vs. 106833

Re: [Xen-devel] [PATCH net] xen-netback: correctly schedule rate-limited queues

2017-06-22 Thread David Miller
From: Wei Liu Date: Wed, 21 Jun 2017 10:21:22 +0100 > Add a flag to indicate if a queue is rate-limited. Test the flag in > NAPI poll handler and avoid rescheduling the queue if true, otherwise > we risk locking up the host. The rescheduling will be done in the > timer

Re: [Xen-devel] [PATCH] mini-os: use gzip -n

2017-06-22 Thread Andrew Cooper
On 22/06/17 15:09, Wei Liu wrote: > Cc minios-devel and Samuel > > On Thu, Jun 22, 2017 at 03:40:26PM +0200, Bernhard M. Wiedemann wrote: >> to not add current timestamp to >> ioemu-stubdom.gz >> pv-grub-x86_32.gz >> pv-grub-x86_64.gz >> xenstore-stubdom.gz >> >> to allow for reproducible builds

Re: [Xen-devel] live migration of HVM domUs with more than 32vcpus fails

2017-06-22 Thread Boris Ostrovsky
On 06/22/2017 10:39 AM, Olaf Hering wrote: > On Thu, Jun 22, Konrad Rzeszutek Wilk wrote: > >> On Thu, Jun 22, 2017 at 03:57:52PM +0200, Olaf Hering wrote: >>> It seems that live migration of HVM domUs with more than 32 vcpus causes >>> a hang of the domU on the remote side. Both ping and 'xl

Re: [Xen-devel] live migration of HVM domUs with more than 32vcpus fails

2017-06-22 Thread Olaf Hering
On Thu, Jun 22, Konrad Rzeszutek Wilk wrote: > On Thu, Jun 22, 2017 at 03:57:52PM +0200, Olaf Hering wrote: > > It seems that live migration of HVM domUs with more than 32 vcpus causes > > a hang of the domU on the remote side. Both ping and 'xl console' show no > > reaction. > > This happens

Re: [Xen-devel] live migration of HVM domUs with more than 32vcpus fails

2017-06-22 Thread Konrad Rzeszutek Wilk
On Thu, Jun 22, 2017 at 03:57:52PM +0200, Olaf Hering wrote: > It seems that live migration of HVM domUs with more than 32 vcpus causes > a hang of the domU on the remote side. Both ping and 'xl console' show no > reaction. > This happens also with kernel-4.12. Is this a known bug? Ankur had some

Re: [Xen-devel] [PATCH v2] VT-d: fix VF of RC integrated endpoint matched to wrong VT-d unit

2017-06-22 Thread Chao Gao
On Thu, Jun 22, 2017 at 03:26:04AM -0600, Jan Beulich wrote: On 21.06.17 at 12:47, wrote: >> The problem is a VF of RC integrated PF (e.g. PF's BDF is 00:02.0), >> we would wrongly use 00:00.0 to search VT-d unit. >> >> To search VT-d unit for a VF, the BDF of the PF is

  1   2   >