[Xen-devel] [xen-unstable test] 117311: tolerable FAIL

2017-12-19 Thread osstest service owner
flight 117311 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/117311/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 14 saverestore-support-checkfail like 117258 test-armhf-armhf-libvirt-xsm 14

[Xen-devel] [xen-4.7-testing baseline-only test] 73075: trouble: blocked/broken

2017-12-19 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 73075 xen-4.7-testing real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/73075/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64

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

2017-12-19 Thread osstest service owner
flight 117305 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/117305/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-qemuu-nested-intel 7 xen-boot fail REGR. vs. 115643

Re: [Xen-devel] Xen PV DomU running Kernel 4.14.5-1.el7.elrepo.x86_64: xl -v vcpu-set triggers domU kernel WARNING, then domU becomes unresponsive

2017-12-19 Thread Adi Pircalabu
Just a quick follow-up, same behaviour with: dom0 running CentOS 7 with https://buildlogs.centos.org/centos/7/virt/x86_64/xen/kernel-4.9.70-29.el7.x86_64.rpm domU running CentOS 7 with kernel-ml-4.14.7-1.el7.elrepo.x86_64 dom0 stacktrace: [ 287.710812] [ cut here ] [

Re: [Xen-devel] [Minios-devel] [PATCH RFC 00/16] Save/Restore Support for mini-OS PVH

2017-12-19 Thread Samuel Thibault
About patch 16, "Replace xenstore and console pfns with the correspondent mfns" seems exactly contrary to what the code does. Apart from that, Reviewed-by: Samuel Thibault Samuel ___ Xen-devel mailing list

Re: [Xen-devel] [Minios-devel] [PATCH RFC 00/16] Save/Restore Support for mini-OS PVH

2017-12-19 Thread Samuel Thibault
About patch 15, it seems your terminal is set to see tabs as 4 spaces. Where tabs are used, the mini-os source code assumes 8 spaces. Avoid using tabs, just use spaces :) And, avoid for (list = dev_list; list->next != NULL; list = list->next); better write for (list = dev_list; list->next !=

Re: [Xen-devel] [Minios-devel] [PATCH RFC 13/16] Save/Restore Support: Add suspend/restore support for Grant Tables.

2017-12-19 Thread Samuel Thibault
Bruno Alvisio, on mar. 19 déc. 2017 15:42:08 -0800, wrote: > +void suspend_gnttab(void) > +{ > +#ifdef CONFIG_PARAVIRT > +int i; > + > +for (i = 0; i < NR_GRANT_FRAMES; i++) { > +HYPERVISOR_update_va_mapping((unsigned long)(((char *)gnttab_table) > + PAGE_SIZE*i), > +

Re: [Xen-devel] [Minios-devel] [PATCH RFC 12/16] Save/Restore Support: Add support for suspend/restore events.

2017-12-19 Thread Samuel Thibault
Bruno Alvisio, on mar. 19 déc. 2017 15:42:07 -0800, wrote: > Signed-off-by: Bruno Alvisio Reviewed-by: Samuel Thibault > --- > events.c | 5 + > include/events.h | 1 + > kernel.c | 2 ++ > 3 files changed, 8

Re: [Xen-devel] [Minios-devel] [PATCH RFC 00/16] Save/Restore Support for mini-OS PVH

2017-12-19 Thread Samuel Thibault
Again, I didn't find patch 11, so I got it from here Bruno Alvisio, on mar. 19 déc. 2017 15:41:55 -0800, wrote: > https://github.com/balvisio/mini-os/tree/feature/mini-os-suspend-support There are indentation oddities bringing spurious hunks. Apart from that, Reviewed-by: Samuel Thibault

Re: [Xen-devel] [Minios-devel] [PATCH RFC 10/16] Save/Restore Support: Add suspend/resume support for timers

2017-12-19 Thread Samuel Thibault
Bruno Alvisio, on mar. 19 déc. 2017 15:42:05 -0800, wrote: > Signed-off-by: Bruno Alvisio > +void resume_time(void) > +{ > +port = bind_virq(VIRQ_TIMER, _handler, NULL); > +unmask_evtchn(port); > +} I'd say rather factorize it with init_time. (you could even

Re: [Xen-devel] [Minios-devel] [PATCH RFC 08/16] Save/Restore Support: Add arch_mm_pre|post_suspend

2017-12-19 Thread Samuel Thibault
Bruno Alvisio, on mar. 19 déc. 2017 15:42:03 -0800, wrote: > For PV guests the pagetables reference the real MFNs rather than PFNs, so when > the guest is resumed into a different area of a hosts memory, these will need > to > be rewritten. Thus for PV guests the MFNs need to be replaced with

Re: [Xen-devel] [Minios-devel] [PATCH RFC 09/16] Save/Restore Support: Disable/enable IRQs during suspend/restore

2017-12-19 Thread Samuel Thibault
Bruno Alvisio, on mar. 19 déc. 2017 15:42:04 -0800, wrote: > Signed-off-by: Bruno Alvisio Reviewed-by: Samuel Thibault > --- > kernel.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/kernel.c b/kernel.c >

Re: [Xen-devel] [Minios-devel] [PATCH RFC 07/16] Save/Restore Support: Add unmap_shared_info

2017-12-19 Thread Samuel Thibault
Bruno Alvisio, on mar. 19 déc. 2017 15:42:02 -0800, wrote: > This function is necessary as part of the pre-suspend operation. > > Signed-off-by: Bruno Alvisio > --- > +void unmap_shared_info(void) > +{ > +int rc; > + > +if ( (rc =

Re: [Xen-devel] [Minios-devel] [PATCH RFC 05/16] Save/Restore Support: Add kernel shutdown logic to shutdown.c

2017-12-19 Thread Samuel Thibault
Bruno Alvisio, on mar. 19 déc. 2017 15:42:00 -0800, wrote: > + * NEC Europe Ltd. PROPRIETARY INFORMATION > + * > + * This software is supplied under the terms of a license agreement > + * or nondisclosure agreement with NEC Europe Ltd. and may not be > + * copied or disclosed except in

Re: [Xen-devel] [Minios-devel] [PATCH RFC 04/16] Save/Restore Support: Add xenbus_release_wait_for_watch

2017-12-19 Thread Samuel Thibault
Bruno Alvisio, on mar. 19 déc. 2017 15:41:59 -0800, wrote: > xenbus_release_wait_for_watch generates a fake event to trigger make > xenbus_wait_for_watch return. This is necessary to wake up waiting threads. Please also document the release_xenbus_id change. > Signed-off-by: Bruno Alvisio

Re: [Xen-devel] [Minios-devel] [PATCH RFC 03/16] Save/Restore Support: Declare kernel and arch pre/post suspend functions

2017-12-19 Thread Samuel Thibault
Bruno Alvisio, on mar. 19 déc. 2017 15:41:58 -0800, wrote: > For mini-OS to support suspend and restore, the kernel will have to suspend > different modules such as xenbus, console, irq, etc. During save/restore the > kernel and arch pre_suspend and post_suspend functions will be invoked to >

Re: [Xen-devel] [Minios-devel] [PATCH RFC 02/16] Save/Restore Support: Refactor trap_init() and setup vector callbacks

2017-12-19 Thread Samuel Thibault
Bruno Alvisio, on mar. 19 déc. 2017 15:41:57 -0800, wrote: > Currently the setup of the IDT and the request to set the HVM vector callbacks > are performed both in the trap_init function. > > As part of the post-suspend operation, the HVM vector callback needs to be > setup > again while the IDT

Re: [Xen-devel] [Minios-devel] [PATCH RFC 01/16] Save/Restore Support: Refactor HYPERVISOR_suspend hypercall

2017-12-19 Thread Samuel Thibault
Bruno Alvisio, on mar. 19 déc. 2017 15:41:56 -0800, wrote: > Directly using the SHUTDOWN_suspend macro as a parameter for the schedop > hypercall causes an error in the Xen hypercall handler. Also for consistency, > the SHUTDOWN_suspend param is wrapped in the sched_shutdown struct. > >

[Xen-devel] [PATCH RFC 07/16] Save/Restore Support: Add unmap_shared_info

2017-12-19 Thread Bruno Alvisio
This function is necessary as part of the pre-suspend operation. Signed-off-by: Bruno Alvisio --- arch/x86/setup.c | 12 hypervisor.c | 12 include/hypervisor.h | 1 + 3 files changed, 25 insertions(+) diff --git

[Xen-devel] [PATCH RFC 14/16] Save/Restore Support: Add suspend/restore support for xenbus

2017-12-19 Thread Bruno Alvisio
Currently the watch path is not saved in the watch struct when it is registered. During xenbus resume the path is needed so that the watches can be registered again. Thus, 'path' field is added to struct watch so that watches can be re-registered during xenbus resume. Signed-off-by: Bruno

[Xen-devel] [PATCH RFC 04/16] Save/Restore Support: Add xenbus_release_wait_for_watch

2017-12-19 Thread Bruno Alvisio
xenbus_release_wait_for_watch generates a fake event to trigger make xenbus_wait_for_watch return. This is necessary to wake up waiting threads. Signed-off-by: Bruno Alvisio --- include/xenbus.h | 1 + xenbus/xenbus.c | 10 +- 2 files changed, 10

[Xen-devel] [PATCH RFC 15/16] Save/Restore Support: Add suspend/restore support for netfront

2017-12-19 Thread Bruno Alvisio
Performed an additional cleanup to make the file more syntactically consistent. Signed-off-by: Bruno Alvisio --- include/netfront.h | 8 +- kernel.c | 8 ++ netfront.c | 242 + 3 files changed,

[Xen-devel] [PATCH RFC 09/16] Save/Restore Support: Disable/enable IRQs during suspend/restore

2017-12-19 Thread Bruno Alvisio
Signed-off-by: Bruno Alvisio --- kernel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel.c b/kernel.c index 1cd40e8..782eb79 100644 --- a/kernel.c +++ b/kernel.c @@ -119,12 +119,12 @@ void start_kernel(void* par) void pre_suspend(void)

[Xen-devel] [PATCH RFC 03/16] Save/Restore Support: Declare kernel and arch pre/post suspend functions

2017-12-19 Thread Bruno Alvisio
For mini-OS to support suspend and restore, the kernel will have to suspend different modules such as xenbus, console, irq, etc. During save/restore the kernel and arch pre_suspend and post_suspend functions will be invoked to suspend/resume each of the modules. Signed-off-by: Bruno Alvisio

[Xen-devel] [PATCH RFC 02/16] Save/Restore Support: Refactor trap_init() and setup vector callbacks

2017-12-19 Thread Bruno Alvisio
Currently the setup of the IDT and the request to set the HVM vector callbacks are performed both in the trap_init function. As part of the post-suspend operation, the HVM vector callback needs to be setup again while the IDT does not. Thus, the trap_init function is split into two separate

[Xen-devel] [PATCH RFC 06/16] Save/Restore Support: Moved shutdown thread to shutdown.c

2017-12-19 Thread Bruno Alvisio
The shutdown thread present in kernel.c was removed and now the thread in shutdown.c is created instead. Signed-off-by: Bruno Alvisio --- arch/x86/setup.c | 2 +- include/kernel.h | 2 +- kernel.c | 50 ++ 3

[Xen-devel] [PATCH RFC 08/16] Save/Restore Support: Add arch_mm_pre|post_suspend

2017-12-19 Thread Bruno Alvisio
For PV guests the pagetables reference the real MFNs rather than PFNs, so when the guest is resumed into a different area of a hosts memory, these will need to be rewritten. Thus for PV guests the MFNs need to be replaced with PFNs: canonicalization. PVH guests are auto-translated so no memory

[Xen-devel] [PATCH RFC 13/16] Save/Restore Support: Add suspend/restore support for Grant Tables.

2017-12-19 Thread Bruno Alvisio
Signed-off-by: Bruno Alvisio --- gnttab.c | 33 + include/gnttab.h | 2 ++ kernel.c | 4 3 files changed, 39 insertions(+) diff --git a/gnttab.c b/gnttab.c index 3f0e35f..a91c2e1 100644 --- a/gnttab.c +++ b/gnttab.c

[Xen-devel] [PATCH RFC 10/16] Save/Restore Support: Add suspend/resume support for timers

2017-12-19 Thread Bruno Alvisio
Signed-off-by: Bruno Alvisio --- arch/x86/time.c | 13 + include/time.h | 2 ++ kernel.c| 4 3 files changed, 19 insertions(+) diff --git a/arch/x86/time.c b/arch/x86/time.c index 3658142..8f79d69 100644 --- a/arch/x86/time.c +++

[Xen-devel] [PATCH RFC 12/16] Save/Restore Support: Add support for suspend/restore events.

2017-12-19 Thread Bruno Alvisio
Signed-off-by: Bruno Alvisio --- events.c | 5 + include/events.h | 1 + kernel.c | 2 ++ 3 files changed, 8 insertions(+) diff --git a/events.c b/events.c index e8ef8aa..342aead 100644 --- a/events.c +++ b/events.c @@ -183,6 +183,11 @@ void

[Xen-devel] [PATCH RFC 00/16] Save/Restore Support for mini-OS PVH

2017-12-19 Thread Bruno Alvisio
Hi all, I have been working on supporting save/restore for mini-os PVH. Some parts of the implementation were taken from the sysml/mini-os repository. The branch can be found at: https://github.com/balvisio/mini-os/tree/feature/mini-os-suspend-support Any feedback would be greatly appreciated.

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

2017-12-19 Thread osstest service owner
flight 117314 seabios real [real] http://logs.test-lab.xenproject.org/osstest/logs/117314/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-ws16-amd64 17 guest-stop fail REGR. vs. 115539 Tests which did not

Re: [Xen-devel] [RFC PATCH 01/60] hyper_dmabuf: initial working version of hyper_dmabuf drv

2017-12-19 Thread Dongwon Kim
I forgot to include this brief information about this patch series. This patch series contains the implementation of a new device driver, hyper_dmabuf, which provides a method for DMA-BUF sharing across different OSes running on the same virtual OS platform powered by a hypervisor. Detailed

Re: [Xen-devel] [PATCH v2 1/3] x86/crashkernel: avoid Xen image when looking for module/crashkernel position

2017-12-19 Thread Daniel Kiper
On Thu, Dec 07, 2017 at 04:39:37PM +0100, Daniel Kiper wrote: > On Thu, Dec 07, 2017 at 04:08:31AM -0700, Jan Beulich wrote: > > >>> On 04.12.17 at 11:24, wrote: > > > --- a/xen/arch/x86/setup.c > > > +++ b/xen/arch/x86/setup.c > > > @@ -653,7 +653,7 @@ void __init

Re: [Xen-devel] [PATCH v2 3/3] x86/setup: remap Xen image up to PFN_DOWN(__pa(_end))

2017-12-19 Thread Daniel Kiper
On Tue, Dec 12, 2017 at 02:42:50AM -0700, Jan Beulich wrote: > >>> On 11.12.17 at 16:12, wrote: > > On Thu, Dec 07, 2017 at 05:02:02AM -0700, Jan Beulich wrote: > >> >>> On 04.12.17 at 11:24, wrote: > >> > Current limit, PFN_DOWN(xen_phys_start),

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

2017-12-19 Thread osstest service owner
flight 117289 xen-4.7-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/117289/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemut-win7-amd64 17 guest-stopfail like 116623 test-xtf-amd64-amd64-2 49

[Xen-devel] [RFC PATCH 50/60] hyper_dmabuf: fix styling err and warns caught by checkpatch.pl

2017-12-19 Thread Dongwon Kim
Fixing all styling problems caught by checkpatch.pl Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_drv.c| 53 ++-- drivers/xen/hyper_dmabuf/hyper_dmabuf_drv.h| 6 +- drivers/xen/hyper_dmabuf/hyper_dmabuf_event.c | 12 +-

[Xen-devel] [RFC PATCH 38/60] hyper_dmabuf: preventing self exporting of dma_buf

2017-12-19 Thread Dongwon Kim
Adding ID check to make sure a dma-buf is exported externally since hyper_dmabuf only allows to export a dmabuf to a different VM. Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_ioctl.c | 6 ++ 1 file changed, 6 insertions(+) diff --git

[Xen-devel] [RFC PATCH 08/60] hyper_dmabuf: automatic comm channel initialization using xenstore

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola This introduces use of xenstore for creating and managing communication channels between two VMs in the system. When hyper_dmabuf driver is loaded in the service VM (host OS), a new xenstore directory, "/local/domain//data/hyper_dmabuf" is

[Xen-devel] [RFC PATCH 37/60] hyper_dmabuf: implementation of query ioctl

2017-12-19 Thread Dongwon Kim
List of queries is re-defined. Now it supports following items: enum hyper_dmabuf_query { DMABUF_QUERY_TYPE = 0x10, DMABUF_QUERY_EXPORTER, DMABUF_QUERY_IMPORTER, DMABUF_QUERY_SIZE, DMABUF_QUERY_BUSY,

[Xen-devel] [RFC PATCH 15/60] hyper_dmabuf: reusing previously released hyper_dmabuf_id

2017-12-19 Thread Dongwon Kim
Now, released hyper_dmabuf_ids are stored in a stack - (hyper_dmabuf_private.id_queue) for reuse. This is to prevent overflow of ids for buffers. We also limit maximum number for the id to 1000 for the stability and optimal performance. Signed-off-by: Dongwon Kim ---

[Xen-devel] [RFC PATCH 58/60] hyper_dmabuf: move device node out of /dev/xen/

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola hyper_dmabuf driver is generic driver that is designed to work with any hypervisor with various backend implementations. So moving out its device node out of /dev/xen. Signed-off-by: Mateusz Polrola Signed-off-by:

[Xen-devel] [RFC PATCH 23/60] hyper_dmabuf: use CONFIG_HYPER_DMABUF_XEN instead of CONFIG_XEN

2017-12-19 Thread Dongwon Kim
Now, use CONFIG_HYPER_DMABUF_XEN as a configuration option for building hyper_dmabuf for Xen hypervisor. Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[Xen-devel] [RFC PATCH 07/60] hyper_dmabuf: message parsing done via workqueue

2017-12-19 Thread Dongwon Kim
Use workqueue mechanism to delay message parsing done after exiting from ISR to reduce ISR execution time. Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_drv.c| 13 ++ drivers/xen/hyper_dmabuf/hyper_dmabuf_drv.h| 5 +

[Xen-devel] [RFC PATCH 55/60] hyper_dmabuf: fixed wrong send_req call

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola Wrong vmid is used in case of sending HYPER_DMABUF_EXPORT_FD_FAILED message. Instead of vmid, hypder dmabuf id is being used. Signed-off-by: Mateusz Polrola Signed-off-by: Dongwon Kim ---

[Xen-devel] [RFC PATCH 39/60] hyper_dmabuf: correcting DMA-BUF clean-up order

2017-12-19 Thread Dongwon Kim
Reordering clean-up procedure Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_ioctl.c | 37 +-- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/drivers/xen/hyper_dmabuf/hyper_dmabuf_ioctl.c

[Xen-devel] [RFC PATCH 06/60] hyper_dmabuf: map shared pages only once when importing.

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola If shared pages of buffer were already mapped on importer side, do not map them again on next request to export fd. Signed-off-by: Mateusz Polrola Signed-off-by: Dongwon Kim ---

[Xen-devel] [RFC PATCH 35/60] hyper_dmabuf: 128bit hyper_dmabuf_id with random keys

2017-12-19 Thread Dongwon Kim
The length of hyper_dmabuf_id is increased to 128bit by adding random key (96bit) to the id. This is to prevent possible leak of the id by guessing on importer VM (by unauthorized application). hyper_dmabuf_id_t is now defined as, typedef struct { int id; int

[Xen-devel] [RFC PATCH 54/60] hyper_dmabuf: 'backend_ops' reduced to 'bknd_ops' and 'ops' to 'bknd_ops'

2017-12-19 Thread Dongwon Kim
To make type's name compact, *_backend_ops is changed to '*_bknd_ops'. Also 'ops' is now changed to 'bknd_ops' to clarify it is a data structure with entry points of 'backend' operations. Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_drv.c|

[Xen-devel] [RFC PATCH 47/60] hyper_dmabuf: fix issues with event-polling

2017-12-19 Thread Dongwon Kim
This patch fixes several defects on event handling including: 1. Imported sgt info and exported sgt info now have buffer for private data (priv) with variable size 2. Now user input to export_remote_ioctl contain sz_priv, which specifies size of private data (e.g. meta data) 3. Increased

[Xen-devel] [RFC PATCH 53/60] hyper_dmabuf: define fastpath_export for exporting existing buffer

2017-12-19 Thread Dongwon Kim
To make hyper_dmabuf_export_remote_ioctl more compact and readable, a new function call, 'fastpath_export' is created to replace a routine in hyper_dmabuf_export_remote_ioctl for the case requested buffer for exporting is already in the LIST (exported previously). Signed-off-by: Dongwon Kim

[Xen-devel] [RFC PATCH 17/60] hyper_dmabuf: use dynamic debug macros for logging

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola Replaces printk to debug macros Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_drv.c| 4 +- drivers/xen/hyper_dmabuf/hyper_dmabuf_drv.h| 4 ++

[Xen-devel] [RFC PATCH 44/60] hyper_dmabuf: proper handling of sgt_info->priv

2017-12-19 Thread Dongwon Kim
sgt_info->priv will be used to store user private info passed in ioctl. Data in sgt_info->priv is transfered via comm channel to the importer VM whenever DMA_BUF is exported to keep the private data synchroized across VMs. This patch also adds hyper_dmabuf_send_export_msg that replaces some of

[Xen-devel] [RFC PATCH 46/60] hyper_dmabuf: delay auto initialization of comm_env

2017-12-19 Thread Dongwon Kim
Comm env intialization is now scheduled to be done when xenstore is initialized. This scheduling is done in driver's init routine. Also, adding a recursively scheduled routine that monitors any new tx ch setup from other domains and automaticlaly configure rx channel accordingly (every 10 sec).

[Xen-devel] [RFC PATCH 45/60] hyper_dmabuf: adding poll/read for event generation

2017-12-19 Thread Dongwon Kim
hyper_dmabuf driver on importing domain now generates event every time new hyper_dmabuf is available (visible) to the importer. Each event comes with 128 byte private data, which can contain any meta data or user data specific to the originator of DMA BUF. Signed-off-by: Dongwon Kim

[Xen-devel] [RFC PATCH 24/60] hyper_dmabuf: waits for resp only if WAIT_AFTER_SYNC_REQ == 1

2017-12-19 Thread Dongwon Kim
hyper_dmabuf's sync_request (previously hyper_dmabuf_sync_request_ and_wait) now does not wait for the response from exporter if WAIT_AFTER_SYNC_REQ==0. This is to prevent peformance degradation due to the communication latency while doing indirect hyper DMABUF synchronization. This patch also

[Xen-devel] [RFC PATCH 51/60] hyper_dmabuf: missing mutex_unlock and move spinlock

2017-12-19 Thread Dongwon Kim
Added missing mutex_unlock to make sure mutex is unlocked before returning. Also, moved spinlock lock/unlock into hyper_dmabuf_send_event and remove checking on spinlock (with assumption caller does the spinlock in advance) to make it more straight forward. This patch includes a couple of minor

[Xen-devel] [RFC PATCH 48/60] hyper_dmabuf: add query items for buffer private info.

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola This change adds two query items, 'HYPER_DMABUF_QUERY_PRIV_INFO_SIZE' and 'HYPER_DMABUF_QUERY_PRIV_INFO', for retrieving buffer's private info and its size. 'info' is an address of user-space buffer (user application provides this) ,where

[Xen-devel] [RFC PATCH 01/60] hyper_dmabuf: initial working version of hyper_dmabuf drv

2017-12-19 Thread Dongwon Kim
Upload of intial version of hyper_DMABUF driver enabling DMA_BUF exchange between two different VMs in virtualized platform based on hypervisor such as KVM or XEN. Hyper_DMABUF drv's primary role is to import a DMA_BUF from originator then re-export it to another Linux VM so that it can be mapped

[Xen-devel] [RFC PATCH 36/60] hyper_dmabuf: error handling when share_pages fails

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola When error occurs while sharing pages, all pages already shared needs to be un-shared and proper error code has to be returned. Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_ioctl.c | 6 ++-

[Xen-devel] [RFC PATCH 34/60] hyper_dmabuf: extend DMA bitmask to 64-bits.

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola Extending DMA bitmask of hyper_dmabuf device to cover whole address space driver may access. Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1

[Xen-devel] [RFC PATCH 41/60] hyper_dmabuf: re-organize driver source

2017-12-19 Thread Dongwon Kim
Re-orginized source code for more intuitive structure For this, 1. driver's file operations other than ioctls have been moved to hyper_dmabuf_drv.c. 2. Separated out dma-buf operations from hyper_dmabuf_ops.c and put those in a new file, 'hyper_dmabuf_ops.c'. Remaining part (SGT core

[Xen-devel] [RFC PATCH 18/60] hyper_dmabuf: reset comm channel when one end has disconnected.

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola When exporter or importer is disconnected, ring buffer should be reinitialzed, otherwise on next reconnection exporter/importer will receive old requests/responses remaining in the ring buffer, which are not valid anymore. This patch also blocks

[Xen-devel] [RFC PATCH 14/60] hyper_dmabuf: clean-up process based on file->f_count

2017-12-19 Thread Dongwon Kim
Now relaese funcs checks f_count for the file instead of our own refcount because it can't track dma_buf_get. Also, importer now sends out HYPER_DMABUF_FIRST_EXPORT to let the exporter know corresponding dma-buf has ever exported on importer's side. This is to cover the case where exporter

[Xen-devel] [RFC PATCH 40/60] hyper_dmabuf: do not use 'private' as field name

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola Using a word, 'private' is not recommended because of conflict with language keyword when compiling with C++. So changing those to 'priv'. Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_ioctl.c | 8

[Xen-devel] [RFC PATCH 28/60] hyper_dmabuf: address several synchronization issues

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola This patch addresses several synchronization issues while sharing DMA_BUF with another VM. 1. Set WAIT_AFTER_SYNC_REQ to false by default to prevent possible performance degradation when waing for the response for every syncrhonization

[Xen-devel] [RFC PATCH 20/60] hyper_dmabuf: optimized loop with less condition check

2017-12-19 Thread Dongwon Kim
Redefined nents_last, which means # of gref in the last page of lvl2 table in any situation even if it is same as REFS_PER_PAGE. With this, loop can be simplified with less condition check. Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/xen/hyper_dmabuf_xen_shm.c

[Xen-devel] [RFC PATCH 25/60] hyper_dmabuf: introduced delayed unexport

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola To prevent overhead when a DMA BUF needs to be exported right after it is unexported, a marginal delay is introduced in unexporting process. This adds a probation period to the unexporting process. If the same DMA_BUF is requested to be exported

[Xen-devel] [RFC PATCH 27/60] hyper_dmabuf: use proper error codes

2017-12-19 Thread Dongwon Kim
Cleaned up and corrected error codes and condition in various error check routines. Also added proper err messages when func returns error. Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_drv.c| 14 +++--

[Xen-devel] [RFC PATCH 09/60] hyper_dmabuf: indirect DMA_BUF synchronization via shadowing

2017-12-19 Thread Dongwon Kim
Importer now sends a synchronization request to the exporter when any of DMA_BUF operations on imported Hyper_DMABUF is executed (e.g dma_buf_map and dma_buf_unmap). This results in a creation of shadow DMA_BUF and exactly same DMA_BUF operation to be executed on it. The main purpose of this is

[Xen-devel] [RFC PATCH 33/60] hyper_dmabuf: error checking on the result of dma_buf_map_attachment

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola Added error checking on the result of function call, dma_buf_map_attachment Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_ioctl.c | 5 + 1 file changed, 5 insertions(+) diff --git

[Xen-devel] [RFC PATCH 22/60] hyper_dmabuf: configure license

2017-12-19 Thread Dongwon Kim
Set the license of the driver to "GPL and MIT-X dual" and owner to "Intel". Also attached license term to all source and header files Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_conf.h | 26 ++

[Xen-devel] [RFC PATCH 31/60] hyper_dmabuf: built-in compilation option

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola Enabled built-in compilation option of hyper_dmabuf driver. Also, moved backend initialization into open() to remove its dependencies on Kernel booting sequence. hyper_dmabuf.h is now installed as one of standard header files of Kernel. This

[Xen-devel] [RFC PATCH 29/60] hyper_dmabuf: make sure to release allocated buffers when exiting

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola It is required to release all allocated buffers when the application crashes. With the change, hyper_dmabuf_sgt_info includes file pointers for the driver. If it's released unexpectedly, the driver is now unexporting all already-exported buffers

[Xen-devel] [RFC PATCH 30/60] hyper_dmabuf: free already mapped pages when error happens

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola It is needed to freeing already-mapped pages if it gets error before finishing mapping all pages. Signed-off-by: Dongwon Kim --- .../xen/hyper_dmabuf/xen/hyper_dmabuf_xen_shm.c| 43 +++--- 1 file

[Xen-devel] [RFC PATCH 03/60] hyper_dmabuf: re-use dma_buf previously exported if exist

2017-12-19 Thread Dongwon Kim
Now we re-use dma_buf instead of exporting it via normal process (including new mappings). For this, hyper_dmabuf list entries can be searched with "struct dma_buf*". Also, ioctl (export_remote) is modified to just return hyper_dmabuf_id if the specific dmabuf has already been exported to the

[Xen-devel] [RFC PATCH 21/60] hyper_dmabuf: exposing drv information using sysfs

2017-12-19 Thread Dongwon Kim
From: Michał Janiszewski This adds two entries in SYSFS with information about imported and exported entries. The information exposed contains details about number of pages, whether a buffer is valid or not, and importer/exporter count. Sysfs for hyper_dmabuf can

[Xen-devel] [RFC PATCH 05/60] hyper_dmabuf: skip creating a comm ch if exist for the VM

2017-12-19 Thread Dongwon Kim
hyper_dmabuf_importer_ring_setup creates new channel only if there is no existing downstream communication channel previously created for the exporter VM. Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_imp.c | 13 +++--

[Xen-devel] [RFC PATCH 26/60] hyper_dmabuf: add mutexes to prevent several race conditions

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola Added mutex to export_fd ioctl to prevent double pages mapping of the same buffer to prevent race condition when two consumers are trying to map the same buffer on importer VM. Also locked mutex before sending request via xen communication

[Xen-devel] [RFC PATCH 11/60] hyper_dmabuf: check stack before unmapping/detaching shadow DMA_BUF

2017-12-19 Thread Dongwon Kim
Make sure list of mapping/attaching activities on impoter VM is not empty before doing unmapping/detaching shadow DMA BUF for indirect synchronization. Signed-off-by: Dongwon Kim --- .../xen/hyper_dmabuf/hyper_dmabuf_remote_sync.c| 68 +- 1 file

[Xen-devel] [RFC PATCH 12/60] hyper_dmabuf: two different unexporting mechanisms

2017-12-19 Thread Dongwon Kim
unexporting on exporter's side now have two options, one is , that just remove and free everything to literally "disconnect" from importer, the other is just to return fail if any apps running on importer is still attached or DMAing. Currently whether forcing or unforcing it is determined by how

[Xen-devel] [RFC PATCH 19/60] hyper_dmabuf: fix the case with sharing a buffer with 2 pages

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola Checking whether buffer has more than two pages should be done by evaluating nents > 1 instead of i > 1 to properly cover the case when nents == 2. Signed-off-by: Dongwon Kim ---

[Xen-devel] [RFC PATCH 04/60] hyper_dmabuf: new index, k for pointing a right n-th page

2017-12-19 Thread Dongwon Kim
Need a new index, k in hyper_dmabuf_extract_pgs function for picking up a correct n-th page in contigous memory space. Signed-off-by: Dongwon Kim --- drivers/xen/hyper_dmabuf/hyper_dmabuf_imp.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git

[Xen-devel] [RFC PATCH 10/60] hyper_dmabuf: make sure to free memory to prevent leak

2017-12-19 Thread Dongwon Kim
From: Mateusz Polrola In hyper_dmabuf_export_remote, page_info->pages needs to be freed before freeing page_info. Also, info_entry in hyper_dmabuf_remove_exported/imported and hyper_dmabuf_remove_exporter/importer_ring needs to be freed after removal of an entry.

Re: [Xen-devel] [Xen-users] Data corruption with xl migrate

2017-12-19 Thread Andreas Pflug
Am 19.12.17 um 11:33 schrieb George Dunlap: > On Sun, Dec 17, 2017 at 3:53 PM, Andreas Pflug > wrote: >> Still experiencing data corruption when migrating 3.16 VMs from one host >> to another... >> Seems independent of Xen version or storage backend. >> >> Regards >>

Re: [Xen-devel] [PATCH V5] pci: removed the is_express field since a uniform interface was inserted

2017-12-19 Thread Marcel Apfelbaum
On 18/12/2017 17:21, Yoni Bettan wrote: according to Eduardo Habkost's commit fd3b02c889 all PCIEs now implement INTERFACE_PCIE_DEVICE so we don't need is_express field anymore. Devices that implements only INTERFACE_PCIE_DEVICE (is_express == 1) or devices that implements only

Re: [Xen-devel] [Qemu-devel] [PATCH V5] pci: removed the is_express field since a uniform interface was inserted

2017-12-19 Thread Eduardo Habkost
On Mon, Dec 18, 2017 at 05:21:40PM +0200, Yoni Bettan wrote: > according to Eduardo Habkost's commit fd3b02c889 all PCIEs now implement > INTERFACE_PCIE_DEVICE so we don't need is_express field anymore. > > Devices that implements only INTERFACE_PCIE_DEVICE (is_express == 1) > or > devices that

Re: [Xen-devel] [PATCH v2] libxl: put RSDP for PVH guest near 4GB

2017-12-19 Thread Juergen Gross
On 19/12/17 17:11, Roger Pau Monné wrote: > On Tue, Dec 19, 2017 at 04:46:37PM +0100, Juergen Gross wrote: >> On 19/12/17 16:38, Roger Pau Monné wrote: >>> On Fri, Dec 01, 2017 at 03:14:07PM +0100, Juergen Gross wrote: Instead of locating the RSDP table below 1MB put it just below 4GB

Re: [Xen-devel] [PATCH v2] libxl: put RSDP for PVH guest near 4GB

2017-12-19 Thread Roger Pau Monné
On Tue, Dec 19, 2017 at 04:46:37PM +0100, Juergen Gross wrote: > On 19/12/17 16:38, Roger Pau Monné wrote: > > On Fri, Dec 01, 2017 at 03:14:07PM +0100, Juergen Gross wrote: > >> Instead of locating the RSDP table below 1MB put it just below 4GB > >> like the rest of the ACPI tables in case of PVH

Re: [Xen-devel] [PATCH v2] libxl: put RSDP for PVH guest near 4GB

2017-12-19 Thread Ian Jackson
Juergen Gross writes ("[PATCH v2] libxl: put RSDP for PVH guest near 4GB"): > Instead of locating the RSDP table below 1MB put it just below 4GB > like the rest of the ACPI tables in case of PVH guests. This will > avoid punching more holes than necessary into the memory map. > > Signed-off-by:

Re: [Xen-devel] [PATCH v2] libxl: put RSDP for PVH guest near 4GB

2017-12-19 Thread Juergen Gross
On 19/12/17 16:38, Roger Pau Monné wrote: > On Fri, Dec 01, 2017 at 03:14:07PM +0100, Juergen Gross wrote: >> Instead of locating the RSDP table below 1MB put it just below 4GB >> like the rest of the ACPI tables in case of PVH guests. This will >> avoid punching more holes than necessary into the

Re: [Xen-devel] [PATCH v2] libxl: put RSDP for PVH guest near 4GB

2017-12-19 Thread Roger Pau Monné
On Fri, Dec 01, 2017 at 03:14:07PM +0100, Juergen Gross wrote: > Instead of locating the RSDP table below 1MB put it just below 4GB > like the rest of the ACPI tables in case of PVH guests. This will > avoid punching more holes than necessary into the memory map. > > Signed-off-by: Juergen Gross

Re: [Xen-devel] [PATCH v2] libxl: put RSDP for PVH guest near 4GB

2017-12-19 Thread Juergen Gross
Ping? On 01/12/17 15:14, Juergen Gross wrote: > Instead of locating the RSDP table below 1MB put it just below 4GB > like the rest of the ACPI tables in case of PVH guests. This will > avoid punching more holes than necessary into the memory map. > > Signed-off-by: Juergen Gross

Re: [Xen-devel] [PATCH v2] xen/balloon: Mark unallocated host memory as UNUSABLE

2017-12-19 Thread Boris Ostrovsky
On 12/19/2017 09:40 AM, Jan Beulich wrote: On 19.12.17 at 15:25, wrote: >> On 12/19/2017 03:23 AM, Jan Beulich wrote: >> On 18.12.17 at 23:22, wrote: + if (!xen_e820_table) + return; >>> Not saying "out of

Re: [Xen-devel] [PATCH] libxl/pvh: force PVH guests to use the xenstore shutdown

2017-12-19 Thread Roger Pau Monné
On Tue, Dec 19, 2017 at 02:48:47PM +, Ian Jackson wrote: > Roger Pau Monné writes ("Re: [PATCH] libxl/pvh: force PVH guests to use the > xenstore shutdown"): > > Yes, that's exactly what I meant but failed to express. Feel free to > > replace the commit message with yours. > > OK, thanks

Re: [Xen-devel] [PATCH] libxl/pvh: force PVH guests to use the xenstore shutdown

2017-12-19 Thread Ian Jackson
Roger Pau Monné writes ("Re: [PATCH] libxl/pvh: force PVH guests to use the xenstore shutdown"): > Yes, that's exactly what I meant but failed to express. Feel free to > replace the commit message with yours. OK, thanks :-). I have Acked-by: Ian Jackson and pushed

Re: [Xen-devel] [PATCH] sched/null: skip vCPUs on the waitqueue that are blocked

2017-12-19 Thread Roger Pau Monné
On Tue, Dec 19, 2017 at 07:25:51AM -0700, Jan Beulich wrote: > >>> On 19.12.17 at 15:16, wrote: > > --- a/xen/common/sched_null.c > > +++ b/xen/common/sched_null.c > > @@ -781,6 +781,10 @@ static struct task_slice null_schedule(const struct > > scheduler *ops, > >

Re: [Xen-devel] [PATCH] libxl/pvh: force PVH guests to use the xenstore shutdown

2017-12-19 Thread Ian Jackson
Roger Pau Monne writes ("[PATCH] libxl/pvh: force PVH guests to use the xenstore shutdown"): > There's no other way to shutdown a PVH guest at the moment. This commit message is rather confusing. Do you mean, instead: PVH guests are all required to support the xenstore-based shutdown

Re: [Xen-devel] [PATCH 2/2] x86/dom0: remove is_pv_domain leftovers from the PV domain builder

2017-12-19 Thread Andrew Cooper
On 19/12/17 14:20, Roger Pau Monne wrote: > Those where added when PVHv1 was sharing the domain builder with PV. > > Signed-off-by: Roger Pau Monné Reviewed-by: Andrew Cooper ___ Xen-devel mailing list

Re: [Xen-devel] [PATCH 2/2] x86/dom0: remove is_pv_domain leftovers from the PV domain builder

2017-12-19 Thread Jan Beulich
>>> On 19.12.17 at 15:20, wrote: > Those where added when PVHv1 was sharing the domain builder with PV. > > Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich ___ Xen-devel

  1   2   >