diff options
| author | Jonah Palmer <jonah.palmer@oracle.com> | 2024-07-10 08:55:17 -0400 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2024-07-21 14:45:56 -0400 |
| commit | 844619147c5110f335cbbbad51cda6a898c7ef33 (patch) | |
| tree | 1ed8cf01d18098c3351b5619e7947052c274c4d0 /hw/net/vhost_net.c | |
| parent | b44135daa3721778f4656ca3c15bd9b3060f1176 (diff) | |
| download | focaccia-qemu-844619147c5110f335cbbbad51cda6a898c7ef33.tar.gz focaccia-qemu-844619147c5110f335cbbbad51cda6a898c7ef33.zip | |
virtio: virtqueue_ordered_flush - VIRTIO_F_IN_ORDER support
Add VIRTIO_F_IN_ORDER feature support for the virtqueue_flush operation. The goal of the virtqueue_ordered_flush operation when the VIRTIO_F_IN_ORDER feature has been negotiated is to write elements to the used/descriptor ring in-order and then update used_idx. The function iterates through the VirtQueueElement used_elems array in-order starting at vq->used_idx. If the element is valid (filled), the element is written to the used/descriptor ring. This process continues until we find an invalid (not filled) element. For packed VQs, the first entry (at vq->used_idx) is written to the descriptor ring last so the guest doesn't see any invalid descriptors. If any elements were written, the used_idx is updated. Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com> Message-Id: <20240710125522.4168043-5-jonah.palmer@oracle.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Eugenio Pérez <eperezma@redhat.com>
Diffstat (limited to 'hw/net/vhost_net.c')
0 files changed, 0 insertions, 0 deletions