Re: [PATCH] virtio_pci: use container_of replace type conversion

2022-08-18 Thread Jason Wang
On Tue, Aug 16, 2022 at 11:06 AM Xuan Zhuo wrote: > > Replace type conversion with container_of() in > vp_modern_set_queue_reset()/vp_modern_get_queue_reset() . > Also combine declarations and assignments. > > Signed-off-by: Xuan Zhuo Acked-by: Jason Wang > --- > drivers/virtio/virtio_pci_mod

Re: [PATCH v5 3/5] vduse: Support using userspace pages as bounce buffer

2022-08-18 Thread Mike Galbraith
Greetings, On Wed, 2022-08-03 at 12:55 +0800, Xie Yongji wrote: > > diff --git a/drivers/vdpa/vdpa_user/iova_domain.h > b/drivers/vdpa/vdpa_user/iova_domain.h > index 2722d9b8e21a..4e0e50e7ac15 100644 > --- a/drivers/vdpa/vdpa_user/iova_domain.h > +++ b/drivers/vdpa/vdpa_user/iova_domain.h > @@ -

Re: [RFC PATCH v3 4/9] vmci/vsock: use 'target' in notify_poll_in callback

2022-08-18 Thread Vishnu Dasa via Virtualization
> On Aug 8, 2022, at 3:36 AM, Stefano Garzarella wrote: > > On Wed, Aug 03, 2022 at 01:57:54PM +, Arseniy Krasnov wrote: >> This callback controls setting of POLLIN,POLLRDNORM output bits of poll() >> syscall,but in some cases,it is incorrectly to set it, when socket has >> at least 1 bytes

Re: [RFC PATCH v3 8/9] vmci/vsock: check SO_RCVLOWAT before wake up reader

2022-08-18 Thread Vishnu Dasa via Virtualization
> On Aug 8, 2022, at 4:01 AM, Stefano Garzarella wrote: > > On Wed, Aug 03, 2022 at 02:05:52PM +, Arseniy Krasnov wrote: >> This adds extra condition to wake up data reader: do it only when number >> of readable bytes >= SO_RCVLOWAT. Otherwise, there is no sense to kick >> user,because it

Re: [PATCH 2/2] vDPA: conditionally read fields in virtio-net dev

2022-08-18 Thread Michael S. Tsirkin
On Fri, Aug 19, 2022 at 08:42:32AM +0800, Jason Wang wrote: > On Fri, Aug 19, 2022 at 7:20 AM Si-Wei Liu wrote: > > > > > > > > On 8/17/2022 9:15 PM, Jason Wang wrote: > > > > > > 在 2022/8/17 18:37, Michael S. Tsirkin 写道: > > >> On Wed, Aug 17, 2022 at 05:43:22PM +0800, Zhu, Lingshan wrote: > > >>

Re: [PATCH v8 3/3] vhost: Remove invalid parameter of VHOST_VDPA_SUSPEND ioctl

2022-08-18 Thread Jason Wang
On Thu, Aug 11, 2022 at 9:54 PM Eugenio Pérez wrote: > > It was a leftover from previous versions. > > Signed-off-by: Eugenio Pérez Acked-by: Jason Wang > --- > Note that I'm not sure this removal is valid. The ioctl is not in master > branch by the send date of this patch, but there are commi

Re: [PATCH v8 2/3] vdpa: Remove wrong doc of VHOST_VDPA_SUSPEND ioctl

2022-08-18 Thread Jason Wang
On Thu, Aug 11, 2022 at 9:54 PM Eugenio Pérez wrote: > > It was a leftover from previous versions. > > Signed-off-by: Eugenio Pérez Acked-by: Jason Wang > --- > include/linux/vdpa.h | 2 +- > include/uapi/linux/vhost.h | 15 +-- > 2 files changed, 6 insertions(+), 11 deleti

Re: [PATCH v8 1/3] vdpa: delete unreachable branch on vdpasim_suspend

2022-08-18 Thread Jason Wang
On Thu, Aug 11, 2022 at 9:54 PM Eugenio Pérez wrote: > > It was a leftover from previous versions. > > Signed-off-by: Eugenio Pérez Acked-by: Jason Wang > --- > drivers/vdpa/vdpa_sim/vdpa_sim.c | 7 --- > 1 file changed, 7 deletions(-) > > diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c >

Re: [PATCH 2/2] vDPA: conditionally read fields in virtio-net dev

2022-08-18 Thread Jason Wang
On Fri, Aug 19, 2022 at 7:20 AM Si-Wei Liu wrote: > > > > On 8/17/2022 9:15 PM, Jason Wang wrote: > > > > 在 2022/8/17 18:37, Michael S. Tsirkin 写道: > >> On Wed, Aug 17, 2022 at 05:43:22PM +0800, Zhu, Lingshan wrote: > >>> > >>> On 8/17/2022 5:39 PM, Michael S. Tsirkin wrote: > On Wed, Aug 17,

Re: [PATCH V5 4/6] vDPA: !FEATURES_OK should not block querying device config space

2022-08-18 Thread Si-Wei Liu
On 8/17/2022 11:52 PM, Zhu, Lingshan wrote: On 8/18/2022 2:48 AM, Si-Wei Liu wrote: On 8/16/2022 11:23 PM, Zhu, Lingshan wrote: On 8/17/2022 2:14 PM, Michael S. Tsirkin wrote: On Wed, Aug 17, 2022 at 10:11:36AM +0800, Zhu, Lingshan wrote: On 8/17/2022 6:48 AM, Si-Wei Liu wrote:   

Re: [PATCH 2/2] vDPA: conditionally read fields in virtio-net dev

2022-08-18 Thread Si-Wei Liu
On 8/17/2022 9:15 PM, Jason Wang wrote: 在 2022/8/17 18:37, Michael S. Tsirkin 写道: On Wed, Aug 17, 2022 at 05:43:22PM +0800, Zhu, Lingshan wrote: On 8/17/2022 5:39 PM, Michael S. Tsirkin wrote: On Wed, Aug 17, 2022 at 05:13:59PM +0800, Zhu, Lingshan wrote: On 8/17/2022 4:55 PM, Michael S.

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

2022-08-18 Thread Robin Murphy
On 2022-08-18 17:38, 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 t

RE: [PATCH 2/2] vDPA: conditionally read fields in virtio-net dev

2022-08-18 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Thursday, August 18, 2022 12:19 AM > On 8/16/2022 10:32 AM, Parav Pandit wrote: > >> From: Zhu Lingshan > >> Sent: Monday, August 15, 2022 5:27 AM > >> > >> Some fields of virtio-net device config space are conditional on > >> the feature bits

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

2022-08-18 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 coh

Re: [PATCH v1] drm/ttm: Refcount allocated tail pages

2022-08-18 Thread Christian König via Virtualization
Am 18.08.22 um 01:13 schrieb Dmitry Osipenko: On 8/18/22 01:57, Dmitry Osipenko wrote: On 8/15/22 18:54, Dmitry Osipenko wrote: On 8/15/22 17:57, Dmitry Osipenko wrote: On 8/15/22 16:53, Christian König wrote: Am 15.08.22 um 15:45 schrieb Dmitry Osipenko: [SNIP] Well that comment sounds lik

Re: [PATCH v2] virtio/virtio_pci_legacy: debug checking for queue size

2022-08-18 Thread Xuan Zhuo
On Thu, 18 Aug 2022 16:40:23 +0800, Jason Wang wrote: > On Thu, Aug 18, 2022 at 4:13 PM Xuan Zhuo wrote: > > > > On Thu, 18 Aug 2022 16:10:45 +0800, Jason Wang wrote: > > > On Thu, Aug 18, 2022 at 11:04 AM Xuan Zhuo > > > wrote: > > > > > > > > Legacy virtio pci has no way to communicate a cha

Re: [PATCH v2] virtio/virtio_pci_legacy: debug checking for queue size

2022-08-18 Thread Jason Wang
On Thu, Aug 18, 2022 at 4:13 PM Xuan Zhuo wrote: > > On Thu, 18 Aug 2022 16:10:45 +0800, Jason Wang wrote: > > On Thu, Aug 18, 2022 at 11:04 AM Xuan Zhuo > > wrote: > > > > > > Legacy virtio pci has no way to communicate a change in vq size to > > > the hypervisor. If ring sizes don't match hyp

Re: [PATCH v2] virtio/virtio_pci_legacy: debug checking for queue size

2022-08-18 Thread Xuan Zhuo
On Thu, 18 Aug 2022 16:10:45 +0800, Jason Wang wrote: > On Thu, Aug 18, 2022 at 11:04 AM Xuan Zhuo wrote: > > > > Legacy virtio pci has no way to communicate a change in vq size to > > the hypervisor. If ring sizes don't match hypervisor will happily > > corrupt memory. > > > > We add a check to

Re: [PATCH v2] virtio/virtio_pci_legacy: debug checking for queue size

2022-08-18 Thread Jason Wang
On Thu, Aug 18, 2022 at 11:04 AM Xuan Zhuo wrote: > > Legacy virtio pci has no way to communicate a change in vq size to > the hypervisor. If ring sizes don't match hypervisor will happily > corrupt memory. > > We add a check to vring size before calling > vp_legacy_set_queue_address(). Checking t

Re: [PATCH] Documentation: add basic information on vDPA

2022-08-18 Thread Jason Wang
On Thu, Aug 18, 2022 at 6:20 AM Stefan Hajnoczi wrote: > > The vDPA driver framework is largely undocumented. Add a basic page that > describes what vDPA is, where to get more information, and how to use > the simulator for testing. > > In the future it would be nice to add an overview of the driv