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@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Reply via email to