Re: [RFC v2 1/7] vhost: expose used buffers

2022-08-25 Thread Jason Wang
在 2022/8/17 21:57, Guo Zhi 写道: Follow VIRTIO 1.1 spec, only writing out a single used ring for a batch of descriptors. Signed-off-by: Guo Zhi --- drivers/vhost/vhost.c | 14 -- drivers/vhost/vhost.h | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) diff --git

Re: [RFC v2 6/7] virtio: in order support for virtio_ring

2022-08-25 Thread Jason Wang
在 2022/8/17 21:57, Guo Zhi 写道: If in order feature negotiated, we can skip the used ring to get buffer's desc id sequentially. Signed-off-by: Guo Zhi --- drivers/virtio/virtio_ring.c | 53 ++-- 1 file changed, 45 insertions(+), 8 deletions(-) diff --git

Re: [PATCH] virtio_blk: add SECURE ERASE command support

2022-08-25 Thread Stefan Hajnoczi
On Wed, Aug 24, 2022 at 10:48:30PM +0300, Alvaro Karsz wrote: > > How about calculating the minimum of the limits? > > Sounds reasonable. > Should I add it to this patch (as v2)? > Or maybe it can be a follow up patch, and it can include the write > zeros command as well. If you can include it

Re: [RFC v2 5/7] virtio: unmask F_NEXT flag in desc_extra

2022-08-25 Thread Jason Wang
在 2022/8/17 21:57, Guo Zhi 写道: We didn't unmask F_NEXT flag in desc_extra in the end of a chain, unmask it so that we can access desc_extra to get next information. Signed-off-by: Guo Zhi I post a similar patch in the past. Please share the perf numbers (e.g pps via pktgen). Thanks

Re: [RFC v2 2/7] vhost_test: batch used buffer

2022-08-25 Thread Jason Wang
在 2022/8/17 21:57, Guo Zhi 写道: Only add to used ring when a batch of buffer have all been used. And if in order feature negotiated, only add the last used descriptor for a batch of buffer. Signed-off-by: Guo Zhi --- drivers/vhost/test.c | 8 +++- 1 file changed, 7 insertions(+), 1

Re: [PATCH] drm/virtio: Fix same-context optimization

2022-08-25 Thread Gerd Hoffmann
On Fri, Aug 12, 2022 at 03:40:00PM -0700, Rob Clark wrote: > From: Rob Clark > > When VIRTGPU_EXECBUF_RING_IDX is used, we should be considering the > timeline that the EB if running on rather than the global driver fence > context. > > Fixes: 85c83ea915ed ("drm/virtio: implement context init:

Re: [RFC v2 3/7] vsock: batch buffers in tx

2022-08-25 Thread Jason Wang
在 2022/8/17 21:57, Guo Zhi 写道: Vsock uses buffers in order, and for tx driver doesn't have to know the length of the buffer. So we can do a batch for vsock if in order negotiated, only write one used ring for a batch of buffers Signed-off-by: Guo Zhi --- drivers/vhost/vsock.c | 9 -

[PATCH v3] iommu/virtio: Fix interaction with VFIO

2022-08-25 Thread Jean-Philippe Brucker
Commit e8ae0e140c05 ("vfio: Require that devices support DMA cache coherence") requires IOMMU drivers to advertise IOMMU_CAP_CACHE_COHERENCY, in order to be used by VFIO. Since VFIO does not provide to userspace the ability to maintain coherency through cache invalidations, it requires hardware

Re: [PATCH v3] iommu/virtio: Fix interaction with VFIO

2022-08-25 Thread Robin Murphy
On 2022-08-25 16:46, Jean-Philippe Brucker wrote: Commit e8ae0e140c05 ("vfio: Require that devices support DMA cache coherence") requires IOMMU drivers to advertise IOMMU_CAP_CACHE_COHERENCY, in order to be used by VFIO. Since VFIO does not provide to userspace the ability to maintain coherency