vhost: Add vhost_svq_valid_features to shadow vq
commit4725a4181b0fd5b646c51f079d7eac753b14b094
authorEugenio Pérez <eperezma@redhat.com>
Mon, 14 Mar 2022 17:34:44 +0000 (14 18:34 +0100)
committerJason Wang <jasowang@redhat.com>
Tue, 15 Mar 2022 05:57:44 +0000 (15 13:57 +0800)
treeaad20294b423827c12eed4b496b2b6edaebd8ce2
parenta8ac88585da1a3ae9c48bfd9e04430e895dc912d
vhost: Add vhost_svq_valid_features to shadow vq

This allows SVQ to negotiate features with the guest and the device. For
the device, SVQ is a driver. While this function bypasses all
non-transport features, it needs to disable the features that SVQ does
not support when forwarding buffers. This includes packed vq layout,
indirect descriptors or event idx.

Future changes can add support to offer more features to the guest,
since the use of VirtQueue gives this for free. This is left out at the
moment for simplicity.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/virtio/vhost-shadow-virtqueue.c
hw/virtio/vhost-shadow-virtqueue.h
hw/virtio/vhost-vdpa.c