virtio: virtqueue_pop - VIRTIO_F_IN_ORDER support
authorJonah Palmer <jonah.palmer@oracle.com>
Wed, 10 Jul 2024 12:55:15 +0000 (08:55 -0400)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 21 Jul 2024 18:45:56 +0000 (14:45 -0400)
commit2256e8482b2bba88abcc734dbc6951b825773f0b
treed86510afaf80c0f71c0e58c41e3293d7abc2a73c
parentc303aa0942589427b42192ef7cff75a79ef8646b
virtio: virtqueue_pop - VIRTIO_F_IN_ORDER support

Add VIRTIO_F_IN_ORDER feature support in virtqueue_split_pop and
virtqueue_packed_pop.

VirtQueueElements popped from the available/descritpor ring are added to
the VirtQueue's used_elems array in-order and in the same fashion as
they would be added the used and descriptor rings, respectively.

This will allow us to keep track of the current order, what elements
have been written, as well as an element's essential data after being
processed.

Reviewed-by: Eugenio Pérez <eperezma@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <20240710125522.4168043-3-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/virtio.c