Re: [RFC PATCH V2] vhost: don't use kmap() to log dirty pages

2019-05-09 Thread Jason Wang
On 2019/5/10 上午10:59, Jason Wang wrote:     r = get_user_pages_fast(log, 1, 1, ); OK so the trick is that page is pinned so you don't expect arch_futex_atomic_op_inuser below to fail.  get_user_pages_fast guarantees page is not going away but does it guarantee PTE won't be invaidated or

Re: [RFC PATCH V2] vhost: don't use kmap() to log dirty pages

2019-05-09 Thread Jason Wang
On 2019/5/9 下午9:18, Michael S. Tsirkin wrote: On Thu, May 09, 2019 at 08:58:00AM -0400, Jason Wang wrote: Vhost log dirty pages directly to a userspace bitmap through GUP and kmap_atomic() since kernel doesn't have a set_bit_to_user() helper. This will cause issues for the arch that has

Re: [PATCH 04/10] s390/mm: force swiotlb for protected virtualization

2019-05-09 Thread Halil Pasic
On Wed, 8 May 2019 15:15:40 +0200 Claudio Imbrenda wrote: > On Fri, 26 Apr 2019 20:32:39 +0200 > Halil Pasic wrote: > > > On s390, protected virtualization guests have to use bounced I/O > > buffers. That requires some plumbing. > > > > Let us make sure, any device that uses DMA API with

Re: [PATCH 05/10] s390/cio: introduce DMA pools to cio

2019-05-09 Thread Halil Pasic
On Thu, 9 May 2019 12:11:06 +0200 Cornelia Huck wrote: > On Wed, 8 May 2019 23:22:10 +0200 > Halil Pasic wrote: > > > On Wed, 8 May 2019 15:18:10 +0200 (CEST) > > Sebastian Ott wrote: > > > > > @@ -1063,6 +1163,7 @@ static int __init css_bus_init(void) > > > >

Re: [PATCH 09/10] virtio/s390: use DMA memory for ccw I/O and classic notifiers

2019-05-09 Thread Halil Pasic
On Thu, 9 May 2019 15:30:08 +0200 Pierre Morel wrote: > On 08/05/2019 16:46, Pierre Morel wrote: > > On 26/04/2019 20:32, Halil Pasic wrote: > >> Before virtio-ccw could get away with not using DMA API for the pieces of > >> memory it does ccw I/O with. With protected virtualization this has to

Re: [PATCH 08/10] virtio/s390: add indirection to indicators access

2019-05-09 Thread Halil Pasic
On Thu, 9 May 2019 14:01:01 +0200 Pierre Morel wrote: > On 08/05/2019 16:31, Pierre Morel wrote: > > On 26/04/2019 20:32, Halil Pasic wrote: > >> This will come in handy soon when we pull out the indicators from > >> virtio_ccw_device to a memory area that is shared with the hypervisor > >> (in

Re: [RFC PATCH V2] vhost: don't use kmap() to log dirty pages

2019-05-09 Thread Michael S. Tsirkin
On Thu, May 09, 2019 at 08:58:00AM -0400, Jason Wang wrote: > Vhost log dirty pages directly to a userspace bitmap through GUP and > kmap_atomic() since kernel doesn't have a set_bit_to_user() > helper. This will cause issues for the arch that has virtually tagged > caches. The way to fix is to

[RFC PATCH V2] vhost: don't use kmap() to log dirty pages

2019-05-09 Thread Jason Wang
Vhost log dirty pages directly to a userspace bitmap through GUP and kmap_atomic() since kernel doesn't have a set_bit_to_user() helper. This will cause issues for the arch that has virtually tagged caches. The way to fix is to keep using userspace virtual address. Fortunately, futex has

Re: [PATCH v7 3/6] libnvdimm: add dax_dev sync flag

2019-05-09 Thread Pankaj Gupta
> > > > This patch adds 'DAXDEV_SYNC' flag which is set > > for nd_region doing synchronous flush. This later > > is used to disable MAP_SYNC functionality for > > ext4 & xfs filesystem for devices don't support > > synchronous flush. > > > > Signed-off-by: Pankaj Gupta > [..] > > diff --git

Re: [PATCH 07/10] s390/airq: use DMA memory for adapter interrupts

2019-05-09 Thread Cornelia Huck
On Fri, 26 Apr 2019 20:32:42 +0200 Halil Pasic wrote: > Protected virtualization guests have to use shared pages for airq > notifier bit vectors, because hypervisor needs to write these bits. > > Let us make sure we allocate DMA memory for the notifier bit vectors. > > Signed-off-by: Halil

Re: [PATCH 05/10] s390/cio: introduce DMA pools to cio

2019-05-09 Thread Cornelia Huck
On Wed, 8 May 2019 23:22:10 +0200 Halil Pasic wrote: > On Wed, 8 May 2019 15:18:10 +0200 (CEST) > Sebastian Ott wrote: > > > @@ -1063,6 +1163,7 @@ static int __init css_bus_init(void) > > > unregister_reboot_notifier(_reboot_notifier); > > > goto out_unregister; > > > } >

Re: [PATCH 06/10] s390/cio: add basic protected virtualization support

2019-05-09 Thread Sebastian Ott
On Wed, 8 May 2019, Halil Pasic wrote: > On Wed, 8 May 2019 15:46:42 +0200 (CEST) > Sebastian Ott wrote: > > On Fri, 26 Apr 2019, Halil Pasic wrote: > > > static struct ccw_device * io_subchannel_allocate_dev(struct subchannel > > > *sch) > > > { > > [..] > > > + cdev->private =

Re: [PATCH 05/10] s390/cio: introduce DMA pools to cio

2019-05-09 Thread Sebastian Ott
On Wed, 8 May 2019, Halil Pasic wrote: > On Wed, 8 May 2019 15:18:10 +0200 (CEST) > Sebastian Ott wrote: > > > @@ -1063,6 +1163,7 @@ static int __init css_bus_init(void) > > > unregister_reboot_notifier(_reboot_notifier); > > > goto out_unregister; > > > } > > > +