Re: [PATCH v2 2/3] vhost: support PACKED when setting-getting vring_base

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 02, 2023 at 07:36:26AM -0400, Michael S. Tsirkin wrote:
On Thu, May 18, 2023 at 09:34:25AM +0200, Stefano Garzarella wrote:
I think we should do one of these things, though:
- mask VIRTIO_F_RING_PACKED in the stable kernels when
VHOST_GET_FEAETURES is called
- backport this patch on all stable kernels that support vhost-vdpa

Maybe the last one makes more sense.

Thanks,
Stefano

OK which patches do you want to go to stable exactly?

Initially I was thinking this entire series, but I think it's too
risky, so on second thoughtwhat do you think about this:

diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
index 8c1aefc865f0..ac2152135b23 100644
--- a/drivers/vhost/vdpa.c
+++ b/drivers/vhost/vdpa.c
@@ -397,6 +397,12 @@ static long vhost_vdpa_get_features(struct vhost_vdpa *v, u64 __user *featurep)

        features = ops->get_device_features(vdpa);

+       /*
+        * IOCTLs (eg. VHOST_GET_VRING_BASE, VHOST_SET_VRING_BASE) don't support
+        * packed virtqueue well yet, so let's filter the feature for now.
+        */
+       features &= ~BIT_ULL(VIRTIO_F_RING_PACKED);
+
        if (copy_to_user(featurep, &features, sizeof(features)))
                return -EFAULT;

I can send the patch ASAP and we can apply it before this series.

Thanks,
Stefano

_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization



[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux