]> git.ipfire.org Git - thirdparty/qemu.git/commit
vhost: Decouple vhost_svq_add from VirtQueueElement
authorEugenio Pérez <eperezma@redhat.com>
Wed, 20 Jul 2022 06:59:33 +0000 (08:59 +0200)
committerJason Wang <jasowang@redhat.com>
Wed, 20 Jul 2022 08:58:08 +0000 (16:58 +0800)
commit1f46ae65d85f677b660bda46685dd3e94885a7cb
treec0b37d27751168ae1bd4477c61cbf338a99825ac
parentf20b70eb5a68cfd8fef74a13ccdd494ef1cb0221
vhost: Decouple vhost_svq_add from VirtQueueElement

VirtQueueElement comes from the guest, but we're heading SVQ to be able
to modify the element presented to the device without the guest's
knowledge.

To do so, make SVQ accept sg buffers directly, instead of using
VirtQueueElement.

Add vhost_svq_add_element to maintain element convenience.

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