Re: [PATCH] vdpa_sim: do not reset IOTLB during device reset

2020-05-14 Thread Jason Wang
On 2020/5/14 下午5:35, Michael S. Tsirkin wrote: On Thu, May 14, 2020 at 03:25:49PM +0800, Jason Wang wrote: We reset IOTLB during device reset this breaks the assumption that the mapping needs to be controlled via vDPA DMA ops explicitly in a incremental way. So the networking will be broken aft

[PATCH AUTOSEL 4.14 31/39] virtio-blk: handle block_device_operations callbacks after hot unplug

2020-05-14 Thread Sasha Levin
From: Stefan Hajnoczi [ Upstream commit 90b5feb8c4bebc76c27fcaf3e1a0e5ca2d319e9e ] A userspace process holding a file descriptor to a virtio_blk device can still invoke block_device_operations after hot unplug. This leads to a use-after-free accessing vblk->vdev in virtblk_getgeo() when ioctl(H

[PATCH AUTOSEL 4.14 17/39] vhost/vsock: fix packet delivery order to monitoring devices

2020-05-14 Thread Sasha Levin
From: Stefano Garzarella [ Upstream commit 107bc0766b9feb5113074c753735a3f115c2141f ] We want to deliver packets to monitoring devices before it is put in the virtqueue, to avoid that replies can appear in the packet capture before the transmitted packet. Signed-off-by: Stefano Garzarella Sign

[PATCH AUTOSEL 4.19 22/31] virtio-blk: handle block_device_operations callbacks after hot unplug

2020-05-14 Thread Sasha Levin
From: Stefan Hajnoczi [ Upstream commit 90b5feb8c4bebc76c27fcaf3e1a0e5ca2d319e9e ] A userspace process holding a file descriptor to a virtio_blk device can still invoke block_device_operations after hot unplug. This leads to a use-after-free accessing vblk->vdev in virtblk_getgeo() when ioctl(H

[PATCH AUTOSEL 4.19 10/31] vhost/vsock: fix packet delivery order to monitoring devices

2020-05-14 Thread Sasha Levin
From: Stefano Garzarella [ Upstream commit 107bc0766b9feb5113074c753735a3f115c2141f ] We want to deliver packets to monitoring devices before it is put in the virtqueue, to avoid that replies can appear in the packet capture before the transmitted packet. Signed-off-by: Stefano Garzarella Sign

[PATCH AUTOSEL 5.4 12/49] vhost/vsock: fix packet delivery order to monitoring devices

2020-05-14 Thread Sasha Levin
From: Stefano Garzarella [ Upstream commit 107bc0766b9feb5113074c753735a3f115c2141f ] We want to deliver packets to monitoring devices before it is put in the virtqueue, to avoid that replies can appear in the packet capture before the transmitted packet. Signed-off-by: Stefano Garzarella Sign

[PATCH AUTOSEL 5.4 29/49] virtio-blk: handle block_device_operations callbacks after hot unplug

2020-05-14 Thread Sasha Levin
From: Stefan Hajnoczi [ Upstream commit 90b5feb8c4bebc76c27fcaf3e1a0e5ca2d319e9e ] A userspace process holding a file descriptor to a virtio_blk device can still invoke block_device_operations after hot unplug. This leads to a use-after-free accessing vblk->vdev in virtblk_getgeo() when ioctl(H

[PATCH AUTOSEL 5.6 32/62] virtio-blk: handle block_device_operations callbacks after hot unplug

2020-05-14 Thread Sasha Levin
From: Stefan Hajnoczi [ Upstream commit 90b5feb8c4bebc76c27fcaf3e1a0e5ca2d319e9e ] A userspace process holding a file descriptor to a virtio_blk device can still invoke block_device_operations after hot unplug. This leads to a use-after-free accessing vblk->vdev in virtblk_getgeo() when ioctl(H

[PATCH AUTOSEL 5.6 13/62] vhost/vsock: fix packet delivery order to monitoring devices

2020-05-14 Thread Sasha Levin
From: Stefano Garzarella [ Upstream commit 107bc0766b9feb5113074c753735a3f115c2141f ] We want to deliver packets to monitoring devices before it is put in the virtqueue, to avoid that replies can appear in the packet capture before the transmitted packet. Signed-off-by: Stefano Garzarella Sign

[Q] vhost: returning misconfigured buffers

2020-05-14 Thread Guennadi Liakhovetski
Hi, Many vhost drivers follow a common process to obtain and verify received buffers: head = vhost_get_vq_desc(vq, vq->iov, ARRAY_SIZE(vq->iov), &out, &in,...); if (head < 0) { return ret; } if (head == vq->num) { /* no buffer */ return 0; /* or -EAGAIN or whatever */ } i

Re: [PATCH v3 1/4] dma-buf: add support for virtio exported objects

2020-05-14 Thread Daniel Vetter
On Thu, May 14, 2020 at 09:59:52AM +0200, Gerd Hoffmann wrote: > Hi, > > > - for the runtime upcasting the usual approach is to check the ->ops > > pointer. Which means that would need to be the same for all virtio > > dma_bufs, which might get a bit awkward. But I'd really prefer we not > > add

Re: [PATCH v3 1/4] dma-buf: add support for virtio exported objects

2020-05-14 Thread Daniel Vetter
On Thu, May 14, 2020 at 05:19:40PM +0900, David Stevens wrote: > Sorry for the duplicate reply, didn't notice this until now. > > > Just storing > > the uuid should be doable (assuming this doesn't change during the > > lifetime of the buffer), so no need for a callback. > > Directly storing the

Re: [PATCH v3 1/4] dma-buf: add support for virtio exported objects

2020-05-14 Thread Daniel Vetter
On Thu, May 14, 2020 at 11:08:52AM +0900, David Stevens wrote: > On Thu, May 14, 2020 at 12:45 AM Daniel Vetter wrote: > > On Wed, Mar 11, 2020 at 12:20 PM David Stevens > > wrote: > > > > > > This change adds a new dma-buf operation that allows dma-bufs to be used > > > by virtio drivers to sha

Re: [virtio-dev] [PATCH v3 00/15] virtio-mem: paravirtualized memory

2020-05-14 Thread David Hildenbrand
On 14.05.20 13:47, David Hildenbrand wrote: > On 14.05.20 13:10, David Hildenbrand wrote: >> On 14.05.20 12:12, David Hildenbrand wrote: >>> On 14.05.20 12:02, teawater wrote: > 2020年5月14日 16:48,David Hildenbrand 写道: > > On 14.05.20 08:44, teawater wrote: >> Hi David, >>>

Re: [virtio-dev] [PATCH v3 00/15] virtio-mem: paravirtualized memory

2020-05-14 Thread David Hildenbrand
On 14.05.20 13:10, David Hildenbrand wrote: > On 14.05.20 12:12, David Hildenbrand wrote: >> On 14.05.20 12:02, teawater wrote: >>> >>> 2020年5月14日 16:48,David Hildenbrand 写道: On 14.05.20 08:44, teawater wrote: > Hi David, > > I got a kernel warning with v2 and v3. >

Re: [virtio-dev] [PATCH v3 00/15] virtio-mem: paravirtualized memory

2020-05-14 Thread David Hildenbrand
On 14.05.20 12:12, David Hildenbrand wrote: > On 14.05.20 12:02, teawater wrote: >> >> >>> 2020年5月14日 16:48,David Hildenbrand 写道: >>> >>> On 14.05.20 08:44, teawater wrote: Hi David, I got a kernel warning with v2 and v3. >>> >>> Hi Hui, >>> >>> thanks for playing with the latest ve

Re: [PATCH v6] iommu/virtio: Use page size bitmap supported by endpoint

2020-05-14 Thread Michael S. Tsirkin
On Thu, May 14, 2020 at 12:50:16PM +0200, Jean-Philippe Brucker wrote: > On Thu, May 14, 2020 at 05:31:00AM -0400, Michael S. Tsirkin wrote: > > On Thu, May 14, 2020 at 01:22:37PM +0530, Bharat Bhushan wrote: > > > Different endpoint can support different page size, probe > > > endpoint if it suppo

Re: [PATCH v6] iommu/virtio: Use page size bitmap supported by endpoint

2020-05-14 Thread Jean-Philippe Brucker
On Thu, May 14, 2020 at 05:31:00AM -0400, Michael S. Tsirkin wrote: > On Thu, May 14, 2020 at 01:22:37PM +0530, Bharat Bhushan wrote: > > Different endpoint can support different page size, probe > > endpoint if it supports specific page size otherwise use > > global page sizes. > > > > Device att

Re: [virtio-dev] [PATCH v3 00/15] virtio-mem: paravirtualized memory

2020-05-14 Thread David Hildenbrand
On 14.05.20 12:02, teawater wrote: > > >> 2020年5月14日 16:48,David Hildenbrand 写道: >> >> On 14.05.20 08:44, teawater wrote: >>> Hi David, >>> >>> I got a kernel warning with v2 and v3. >> >> Hi Hui, >> >> thanks for playing with the latest versions. Surprisingly, I can >> reproduce even by hotplug

Re: [PATCH] vdpa_sim: do not reset IOTLB during device reset

2020-05-14 Thread Michael S. Tsirkin
On Thu, May 14, 2020 at 03:25:49PM +0800, Jason Wang wrote: > We reset IOTLB during device reset this breaks the assumption that the > mapping needs to be controlled via vDPA DMA ops explicitly in a > incremental way. So the networking will be broken after e.g a guest > reset. > > Fix this by not

Re: [PATCH v6] iommu/virtio: Use page size bitmap supported by endpoint

2020-05-14 Thread Michael S. Tsirkin
On Thu, May 14, 2020 at 01:22:37PM +0530, Bharat Bhushan wrote: > Different endpoint can support different page size, probe > endpoint if it supports specific page size otherwise use > global page sizes. > > Device attached to domain should support a minimum of > domain supported page sizes. If de

Re: [virtio-dev] [PATCH v3 00/15] virtio-mem: paravirtualized memory

2020-05-14 Thread David Hildenbrand
On 14.05.20 08:44, teawater wrote: > Hi David, > > I got a kernel warning with v2 and v3. Hi Hui, thanks for playing with the latest versions. Surprisingly, I can reproduce even by hotplugging a DIMM instead as well - that's good, so it's not related to virtio-mem, lol. Seems to be some QEMU set

Re: [PATCH v3 1/4] dma-buf: add support for virtio exported objects

2020-05-14 Thread Gerd Hoffmann
Hi, > - for the runtime upcasting the usual approach is to check the ->ops > pointer. Which means that would need to be the same for all virtio > dma_bufs, which might get a bit awkward. But I'd really prefer we not > add allocator specific stuff like this to dma-buf. This is exactly the proble

Re: [PATCH 4/9] drm/virtio: Call the right shmem helpers

2020-05-14 Thread Thomas Zimmermann
Am 11.05.20 um 11:35 schrieb Daniel Vetter: > drm_gem_shmem_get_sg_table is meant to implement > obj->funcs->get_sg_table, for prime exporting. The one we want is > drm_gem_shmem_get_pages_sgt, which also handles imported dma-buf, not > just native objects. > > v2: Rebase, this stuff moved aroun

[PATCH] vdpa_sim: do not reset IOTLB during device reset

2020-05-14 Thread Jason Wang
We reset IOTLB during device reset this breaks the assumption that the mapping needs to be controlled via vDPA DMA ops explicitly in a incremental way. So the networking will be broken after e.g a guest reset. Fix this by not resetting the IOTLB during device reset. Signed-off-by: Jason Wang ---