vhost-vsock: add VIRTIO_F_RING_PACKED to feature_bits
authorHalil Pasic <pasic@linux.ibm.com>
Mon, 29 Apr 2024 11:33:34 +0000 (13:33 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 1 Jul 2024 18:56:23 +0000 (14:56 -0400)
commita0eebd790ca4f90fc1e3662cb38542ccc21963bf
tree49b081f743571fbfffe85084a0115e61f25db78a
parent5093bee0fa8a6c9712c96653da3a79bc37a4e45d
vhost-vsock: add VIRTIO_F_RING_PACKED to feature_bits

Not having VIRTIO_F_RING_PACKED in feature_bits[] is a problem when the
vhost-vsock device does not offer the feature bit VIRTIO_F_RING_PACKED
but the in QEMU device is configured to try to use the packed layout
(the virtio property "packed" is on).

As of today, the  Linux kernel vhost-vsock device does not support the
packed queue layout (as vhost does not support packed), and does not
offer VIRTIO_F_RING_PACKED. Thus when for example a vhost-vsock-ccw is
used with packed=on, VIRTIO_F_RING_PACKED ends up being negotiated,
despite the fact that the device does not actually support it, and
one gets to keep the pieces.

Fixes: 74b3e46630 ("virtio: add property to enable packed virtqueue")
Reported-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Halil Pasic <pasic@linux.ibm.com>
Message-Id: <20240429113334.2454197-1-pasic@linux.ibm.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/vhost-vsock-common.c