Re: [PATCH v12 2/7] virtio-pmem: Add virtio pmem driver

2019-06-11 Thread Cornelia Huck
Hi Pankaj, On Tue, 11 Jun 2019 23:34:50 -0400 (EDT) Pankaj Gupta wrote: > Hi Cornelia, > > > On Tue, 11 Jun 2019 22:07:57 +0530 > > Pankaj Gupta wrote: > > > + err1 = virtqueue_kick(vpmem->req_vq); > > > + spin_unlock_irqrestore(&vpmem->pmem_lock, flags); > > > + /* > > > + * virtqueue_add_

Re: [PATCH v4 2/8] s390/cio: introduce DMA pools to cio

2019-06-11 Thread Cornelia Huck
On Thu, 6 Jun 2019 13:51:21 +0200 Halil Pasic wrote: [just looked at it in the context of failed init] > +static void __gp_dma_free_dma(struct gen_pool *pool, > + struct gen_pool_chunk *chunk, void *data) Just to note: the 'pool' is mandated by the api for this callba

Re: [PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts

2019-06-11 Thread Cornelia Huck
On Wed, 12 Jun 2019 02:32:31 +0200 Halil Pasic wrote: > On Tue, 11 Jun 2019 18:19:44 +0200 > Cornelia Huck wrote: > > > On Tue, 11 Jun 2019 16:27:21 +0200 > > Halil Pasic wrote: > > > IMHO the cleanest thing to do at this stage is to check if the > > > airq_iv_cache is NULL and fail the alloc

Re: [PATCH v12 2/7] virtio-pmem: Add virtio pmem driver

2019-06-11 Thread Pankaj Gupta
Hi Cornelia, > On Tue, 11 Jun 2019 22:07:57 +0530 > Pankaj Gupta wrote: > > > This patch adds virtio-pmem driver for KVM guest. > > > > Guest reads the persistent memory range information from > > Qemu over VIRTIO and registers it on nvdimm_bus. It also > > creates a nd_region object with the

Re: [Qemu-devel] [PATCH v12 4/7] dm: enable synchronous dax

2019-06-11 Thread Pankaj Gupta
> On Tue, Jun 11 2019 at 12:37pm -0400, > Pankaj Gupta wrote: > > > This patch sets dax device 'DAXDEV_SYNC' flag if all the target > > devices of device mapper support synchrononous DAX. If device > > mapper consists of both synchronous and asynchronous dax devices, > > we don't set 'DAXDEV_SY

Re: [PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts

2019-06-11 Thread Halil Pasic
On Tue, 11 Jun 2019 18:19:44 +0200 Cornelia Huck wrote: > On Tue, 11 Jun 2019 16:27:21 +0200 > Halil Pasic wrote: > > > On Tue, 11 Jun 2019 12:17:21 +0200 > > Cornelia Huck wrote: > > > > > On Thu, 6 Jun 2019 13:51:23 +0200 > > > Halil Pasic wrote: > > > > > > > Protected virtualization

Re: [PATCH v12 4/7] dm: enable synchronous dax

2019-06-11 Thread Mike Snitzer
On Tue, Jun 11 2019 at 12:37pm -0400, Pankaj Gupta wrote: > This patch sets dax device 'DAXDEV_SYNC' flag if all the target > devices of device mapper support synchrononous DAX. If device > mapper consists of both synchronous and asynchronous dax devices, > we don't set 'DAXDEV_SYNC' flag. > > '

Re: [PATCH v12 2/7] virtio-pmem: Add virtio pmem driver

2019-06-11 Thread Cornelia Huck
On Tue, 11 Jun 2019 22:07:57 +0530 Pankaj Gupta wrote: > This patch adds virtio-pmem driver for KVM guest. > > Guest reads the persistent memory range information from > Qemu over VIRTIO and registers it on nvdimm_bus. It also > creates a nd_region object with the persistent memory > range infor

[PATCH v12 7/7] xfs: disable map_sync for async flush

2019-06-11 Thread Pankaj Gupta
Dont support 'MAP_SYNC' with non-DAX files and DAX files with asynchronous dax_device. Virtio pmem provides asynchronous host page cache flush mechanism. We don't support 'MAP_SYNC' with virtio pmem and xfs. Signed-off-by: Pankaj Gupta Reviewed-by: Darrick J. Wong --- fs/xfs/xfs_file.c | 9

[PATCH v12 6/7] ext4: disable map_sync for async flush

2019-06-11 Thread Pankaj Gupta
Dont support 'MAP_SYNC' with non-DAX files and DAX files with asynchronous dax_device. Virtio pmem provides asynchronous host page cache flush mechanism. We don't support 'MAP_SYNC' with virtio pmem and ext4. Signed-off-by: Pankaj Gupta Reviewed-by: Jan Kara --- fs/ext4/file.c | 10 ++

[PATCH v12 5/7] dax: check synchronous mapping is supported

2019-06-11 Thread Pankaj Gupta
This patch introduces 'daxdev_mapping_supported' helper which checks if 'MAP_SYNC' is supported with filesystem mapping. It also checks if corresponding dax_device is synchronous. Virtio pmem device is asynchronous and does not not support VM_SYNC. Suggested-by: Jan Kara Signed-off-by: Pankaj Gup

[PATCH v12 4/7] dm: enable synchronous dax

2019-06-11 Thread Pankaj Gupta
This patch sets dax device 'DAXDEV_SYNC' flag if all the target devices of device mapper support synchrononous DAX. If device mapper consists of both synchronous and asynchronous dax devices, we don't set 'DAXDEV_SYNC' flag. 'dm_table_supports_dax' is refactored to pass 'iterate_devices_fn' as arg

[PATCH v12 3/7] libnvdimm: add dax_dev sync flag

2019-06-11 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 --- drivers/dax/bus.c| 2 +- drivers/dax/sup

[PATCH v12 1/7] libnvdimm: nd_region flush callback support

2019-06-11 Thread Pankaj Gupta
This patch adds functionality to perform flush from guest to host over VIRTIO. We are registering a callback based on 'nd_region' type. virtio_pmem driver requires this special flush function. For rest of the region types we are registering existing flush function. Report error returned by host fsy

[PATCH v12 2/7] virtio-pmem: Add virtio pmem driver

2019-06-11 Thread Pankaj Gupta
This patch adds virtio-pmem driver for KVM guest. Guest reads the persistent memory range information from Qemu over VIRTIO and registers it on nvdimm_bus. It also creates a nd_region object with the persistent memory range information so that existing 'nvdimm/pmem' driver can reserve this into sy

[PATCH v12 0/7] virtio pmem driver

2019-06-11 Thread Pankaj Gupta
This patch series is ready to be merged via nvdimm tree as discussed with Dan. We have ack/review on XFS, EXT4 & VIRTIO patches. Device mapper change is also reviewed. Mike, Can you please provide ack for device mapper change i.e patch4. This version has changed implementation for patch 4

Re: [PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts

2019-06-11 Thread Cornelia Huck
On Tue, 11 Jun 2019 16:27:21 +0200 Halil Pasic wrote: > On Tue, 11 Jun 2019 12:17:21 +0200 > Cornelia Huck wrote: > > > On Thu, 6 Jun 2019 13:51:23 +0200 > > Halil Pasic wrote: > > > > > Protected virtualization guests have to use shared pages for airq > > > notifier bit vectors, because h

Re: [Qemu-devel] [PATCH v11 4/7] dm: enable synchronous dax

2019-06-11 Thread Pankaj Gupta
> > > Hi Mike, > > > > Thanks for the review Please find my reply inline. > > > > > > > > dm_table_supports_dax() is called multiple times (from > > > dm_table_set_restrictions and dm_table_determine_type). It is strange > > > to have a getter have a side-effect of being a setter too. Over

Re: [PATCH] drm/virtio: drop framebuffer dirty tracking code

2019-06-11 Thread Daniel Vetter
On Tue, Jun 11, 2019 at 02:54:07PM +0200, Gerd Hoffmann wrote: > No need to have our own implementation, > atomic helpers can do it for us. > > Signed-off-by: Gerd Hoffmann Nice! I think you got it all, most of the custom code already disappeared with the switch to generic fbdev code. Reviewed

Re: [PATCH v11 4/7] dm: enable synchronous dax

2019-06-11 Thread Mike Snitzer
On Tue, Jun 11 2019 at 9:10am -0400, Pankaj Gupta wrote: > Hi Mike, > > Thanks for the review Please find my reply inline. > > > > > dm_table_supports_dax() is called multiple times (from > > dm_table_set_restrictions and dm_table_determine_type). It is strange > > to have a getter have a si

Re: [PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts

2019-06-11 Thread Halil Pasic
On Tue, 11 Jun 2019 12:17:21 +0200 Cornelia Huck wrote: > On Thu, 6 Jun 2019 13:51:23 +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

Re: [Qemu-devel] [PATCH v11 4/7] dm: enable synchronous dax

2019-06-11 Thread Pankaj Gupta
Hi Mike, Thanks for the review Please find my reply inline. > > dm_table_supports_dax() is called multiple times (from > dm_table_set_restrictions and dm_table_determine_type). It is strange > to have a getter have a side-effect of being a setter too. Overloading > like this could get you in t

[PATCH] drm/virtio: drop framebuffer dirty tracking code

2019-06-11 Thread Gerd Hoffmann
No need to have our own implementation, atomic helpers can do it for us. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_drv.h | 7 -- drivers/gpu/drm/virtio/virtgpu_display.c | 20 +-- drivers/gpu/drm/virtio/virtgpu_fb.c | 150 --- drivers/gpu/drm

Re: [PATCH trivial] mm/balloon_compaction: Grammar s/the its/its/

2019-06-11 Thread David Hildenbrand
On 07.06.19 13:35, Geert Uytterhoeven wrote: > Signed-off-by: Geert Uytterhoeven > --- > mm/balloon_compaction.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/balloon_compaction.c b/mm/balloon_compaction.c > index ba739b76e6c52e55..17ac81d8d26bcb50 100644 > --- a/mm

Re: [PATCH v4 0/8] s390: virtio: support protected virtualization

2019-06-11 Thread Michael S. Tsirkin
On Tue, Jun 11, 2019 at 12:37:40PM +0200, Cornelia Huck wrote: > On Thu, 6 Jun 2019 13:51:19 +0200 > Halil Pasic wrote: > > > * Documentation is still very sketchy. I'm committed to improving this, > > but I'm currently hampered by some dependencies currently. > > Have the "dependencies" be

Re: [PATCH v4 0/8] s390: virtio: support protected virtualization

2019-06-11 Thread Cornelia Huck
On Thu, 6 Jun 2019 13:51:19 +0200 Halil Pasic wrote: > * Documentation is still very sketchy. I'm committed to improving this, > but I'm currently hampered by some dependencies currently. Have the "dependencies" been resolved in the meantime? It probably would be a good idea to include some

Re: [PATCH v4 7/8] virtio/s390: use DMA memory for ccw I/O and classic notifiers

2019-06-11 Thread Cornelia Huck
On Thu, 6 Jun 2019 13:51:26 +0200 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 > change, since the hypervisor needs to read and sometimes also write these > pieces of memory

Re: [PATCH v4 8/8] virtio/s390: make airq summary indicators DMA

2019-06-11 Thread Cornelia Huck
On Thu, 6 Jun 2019 13:51:27 +0200 Halil Pasic wrote: > Hypervisor needs to interact with the summary indicators, so these > need to be DMA memory as well (at least for protected virtualization > guests). > > Signed-off-by: Halil Pasic > --- > drivers/s390/virtio/virtio_ccw.c | 32

Re: [PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts

2019-06-11 Thread Cornelia Huck
On Thu, 6 Jun 2019 13:51:23 +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 by > replacing the kmem_cache w

Re: [PATCH v4 2/8] s390/cio: introduce DMA pools to cio

2019-06-11 Thread Cornelia Huck
On Thu, 6 Jun 2019 13:51:21 +0200 Halil Pasic wrote: > To support protected virtualization cio will need to make sure the > memory used for communication with the hypervisor is DMA memory. > > Let us introduce one global pool for cio. > > Our DMA pools are implemented as a gen_pool backed with