Re: [PATCH v2] mic: vop: Fix broken virtqueues

2019-01-30 Thread Greg KH
On Wed, Jan 30, 2019 at 05:28:09PM +0100, Vincent Whitchurch wrote: > VOP is broken in mainline since commit 1ce9e6055fa0a9043 ("virtio_ring: > introduce packed ring support"); attempting to use the virtqueues leads > to various kernel crashes. I'm testing it with my not-yet-merged > loopback

Re: [PATCH 0/5 v5] Fix virtio-blk issue with SWIOTLB

2019-01-30 Thread Konrad Rzeszutek Wilk
On Wed, Jan 30, 2019 at 05:40:02PM +0100, Joerg Roedel wrote: > Hi, > > here is the next version of this patch-set. Previous > versions can be found here: > > V1: https://lore.kernel.org/lkml/20190110134433.15672-1-j...@8bytes.org/ > > V2:

[PATCH 1/5] swiotlb: Introduce swiotlb_max_mapping_size()

2019-01-30 Thread Joerg Roedel
From: Joerg Roedel The function returns the maximum size that can be remapped by the SWIOTLB implementation. This function will be later exposed to users through the DMA-API. Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Christoph Hellwig Signed-off-by: Joerg Roedel ---

[PATCH 2/5] swiotlb: Add is_swiotlb_active() function

2019-01-30 Thread Joerg Roedel
From: Joerg Roedel This function will be used from dma_direct code to determine the maximum segment size of a dma mapping. Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Christoph Hellwig Signed-off-by: Joerg Roedel --- include/linux/swiotlb.h | 6 ++ kernel/dma/swiotlb.c| 9

[PATCH 0/5 v5] Fix virtio-blk issue with SWIOTLB

2019-01-30 Thread Joerg Roedel
Hi, here is the next version of this patch-set. Previous versions can be found here: V1: https://lore.kernel.org/lkml/20190110134433.15672-1-j...@8bytes.org/ V2: https://lore.kernel.org/lkml/20190115132257.6426-1-j...@8bytes.org/ V3:

Re: [PATCH] virtio_net: Introduce extended RSC feature

2019-01-30 Thread Michael S. Tsirkin
On Wed, Jan 30, 2019 at 09:42:07AM +0200, Yuri Benditovich wrote: > > > On Tue, Jan 29, 2019 at 6:07 PM Michael S. Tsirkin wrote: > > On Tue, Jan 29, 2019 at 02:52:36PM +0200, Yuri Benditovich wrote: > > VIRTIO_NET_F_RSC_EXT feature bit indicates that the device > > is able to

Re: [PATCH] mic: vop: Fix broken virtqueues

2019-01-30 Thread Sudeep Dutt
On Tue, 2019-01-29 at 11:22 +0100, Vincent Whitchurch wrote: > VOP is broken in mainline since commit 1ce9e6055fa0a9043 ("virtio_ring: > introduce packed ring support"); attempting to use the virtqueues leads > to various kernel crashes. I'm testing it with my not-yet-merged > loopback patches,

Re: [PATCH 4/5] virtio: Introduce virtio_max_dma_size()

2019-01-30 Thread Lendacky, Thomas
On 1/29/19 2:43 AM, Joerg Roedel wrote: > From: Joerg Roedel > > This function returns the maximum segment size for a single > dma transaction of a virtio device. The possible limit comes > from the SWIOTLB implementation in the Linux kernel, that > has an upper limit of (currently) 256kb of

Re: [PATCH 3/5] dma: Introduce dma_max_mapping_size()

2019-01-30 Thread Lendacky, Thomas
On 1/29/19 2:43 AM, Joerg Roedel wrote: > From: Joerg Roedel > > The function returns the maximum size that can be mapped > using DMA-API functions. The patch also adds the > implementation for direct DMA and a new dma_map_ops pointer > so that other implementations can expose their limit. > >

Re: [PATCH 0/5 v5] Fix virtio-blk issue with SWIOTLB

2019-01-30 Thread Lendacky, Thomas
On 1/30/19 10:40 AM, Joerg Roedel wrote: > Hi, > > here is the next version of this patch-set. Previous > versions can be found here: > > V1: https://lore.kernel.org/lkml/20190110134433.15672-1-j...@8bytes.org/ > > V2:

[PATCH 5/5] virtio-blk: Consider virtio_max_dma_size() for maximum segment size

2019-01-30 Thread Joerg Roedel
From: Joerg Roedel Segments can't be larger than the maximum DMA mapping size supported on the platform. Take that into account when setting the maximum segment size for a block device. Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Christoph Hellwig Signed-off-by: Joerg Roedel ---

[PATCH 4/5] virtio: Introduce virtio_max_dma_size()

2019-01-30 Thread Joerg Roedel
From: Joerg Roedel This function returns the maximum segment size for a single dma transaction of a virtio device. The possible limit comes from the SWIOTLB implementation in the Linux kernel, that has an upper limit of (currently) 256kb of contiguous memory it can map. Other DMA-API

[PATCH 3/5] dma: Introduce dma_max_mapping_size()

2019-01-30 Thread Joerg Roedel
From: Joerg Roedel The function returns the maximum size that can be mapped using DMA-API functions. The patch also adds the implementation for direct DMA and a new dma_map_ops pointer so that other implementations can expose their limit. Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by:

[PATCH v2 6/6] drm/virtio: move virtio_gpu_cmd_create_resource call into virtio_gpu_object_create

2019-01-30 Thread Gerd Hoffmann
Specifically call virtio_gpu_object_create() before ttm_bo_init(), so the object is already created when ttm calls the virtio_gpu_ttm_tt_bind() callback (which in turn calls virtio_gpu_object_attach()). With that in place virtio_gpu_object_attach() will never be called with an object which is not

[PATCH v2 2/6] drm/virtio: use struct to pass params to virtio_gpu_object_create()

2019-01-30 Thread Gerd Hoffmann
Create virtio_gpu_object_params, use that to pass object parameters to virtio_gpu_object_create. This is just the first step, followup patches will add more parameters to the struct. The plan is to use the struct for all object parameters. Also drop unused "kernel" parameter for

[PATCH v2 5/6] drm/virtio: drop fencing in virtio_gpu_resource_create_ioctl

2019-01-30 Thread Gerd Hoffmann
There is no need to wait for completion here. The host will process commands in submit order, so commands can reference the new resource just fine even when queued up before completion. On the guest side there is no need to wait for completion too. Which btw is different from resource destroy,

[PATCH v2 1/6] drm/virtio: move virtio_gpu_object_{attach, detach} calls.

2019-01-30 Thread Gerd Hoffmann
Drop the dummy ttm backend implementation, add a real one for TTM_PL_FLAG_TT objects. The bin/unbind callbacks will call virtio_gpu_object_{attach,detach}, to update the object state on the host side, instead of invoking those calls from the move_notify() callback. With that in place the move

[PATCH v2 3/6] drm/virtio: params struct for virtio_gpu_cmd_create_resource()

2019-01-30 Thread Gerd Hoffmann
Add format, width and height fields to the virtio_gpu_object_params struct. With that in place we can use the parameter struct for virtio_gpu_cmd_create_resource() calls too. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_drv.h | 7 ---

Re: INFO: task hung in vhost_init_device_iotlb

2019-01-30 Thread Dmitry Vyukov via Virtualization
On Tue, Jan 29, 2019 at 5:06 PM Michael S. Tsirkin wrote: > > On Tue, Jan 29, 2019 at 01:22:02AM -0800, syzbot wrote: > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:983542434e6b Merge tag 'edac_fix_for_5.0' of git://git.ker.. > > git tree: upstream > >

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-01-30 Thread Christoph Hellwig
On Tue, Jan 29, 2019 at 09:36:08PM -0500, Michael S. Tsirkin wrote: > This has been discussed ad nauseum. virtio is all about compatibility. > Losing a couple of lines of code isn't worth breaking working setups. > People that want "just use DMA API no tricks" now have the option. > Setting a flag