aboutsummaryrefslogtreecommitdiff
path: root/include/hw/virtio/virtio.h
diff options
context:
space:
mode:
authorJonah Palmer <jonah.palmer@oracle.com>2024-03-15 12:55:52 -0400
committerMichael S. Tsirkin <mst@redhat.com>2024-07-01 14:56:23 -0400
commitcf39b82860b63589460d8797dd70ae3c1647ccca (patch)
tree72812d26bf5f73fb3d94cf6d90ddd2749d6ac097 /include/hw/virtio/virtio.h
parent9d5a807c4cb56837f11be9a9250f854fab951290 (diff)
downloadqemu-cf39b82860b63589460d8797dd70ae3c1647ccca.zip
qemu-cf39b82860b63589460d8797dd70ae3c1647ccca.tar.gz
qemu-cf39b82860b63589460d8797dd70ae3c1647ccca.tar.bz2
virtio/virtio-pci: Handle extra notification data
Add support to virtio-pci devices for handling the extra data sent from the driver to the device when the VIRTIO_F_NOTIFICATION_DATA transport feature has been negotiated. The extra data that's passed to the virtio-pci device when this feature is enabled varies depending on the device's virtqueue layout. In a split virtqueue layout, this data includes: - upper 16 bits: shadow_avail_idx - lower 16 bits: virtqueue index In a packed virtqueue layout, this data includes: - upper 16 bits: 1-bit wrap counter & 15-bit shadow_avail_idx - lower 16 bits: virtqueue index Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com> Message-Id: <20240315165557.26942-2-jonah.palmer@oracle.com> Reviewed-by: Eugenio PĂ©rez <eperezma@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/virtio/virtio.h')
-rw-r--r--include/hw/virtio/virtio.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
index 7d5ffdc..1451926 100644
--- a/include/hw/virtio/virtio.h
+++ b/include/hw/virtio/virtio.h
@@ -307,6 +307,8 @@ int virtio_queue_ready(VirtQueue *vq);
int virtio_queue_empty(VirtQueue *vq);
+void virtio_queue_set_shadow_avail_idx(VirtQueue *vq, uint16_t idx);
+
/* Host binding interface. */
uint32_t virtio_config_readb(VirtIODevice *vdev, uint32_t addr);