summaryrefslogtreecommitdiff
path: root/include/virtio_ring.h
AgeCommit message (Collapse)Author
2023-04-25virtio: Allocate bounce buffers for devices with VIRTIO_F_IOMMU_PLATFORMWill Deacon
In preparation for bouncing virtio data for devices advertising the VIRTIO_F_IOMMU_PLATFORM feature, allocate an array of bounce buffer structures in the vring, one per descriptor. Signed-off-by: Will Deacon <[email protected]> [ Paul: pick from the Android tree. Rebase to the upstream ] Signed-off-by: Ying-Chun Liu (PaulLiu) <[email protected]> Cc: Bin Meng <[email protected]> Link: https://android.googlesource.com/platform/external/u-boot/+/3e052749e7c50c4c1a6014e645ae3b9be3710c07 Reviewed-by: Simon Glass <[email protected]>
2023-04-25virtio: Allocate virtqueue in page-size unitsWill Deacon
In preparation for explicit bouncing of virtqueue pages for devices advertising the VIRTIO_F_IOMMU_PLATFORM feature, introduce a couple of wrappers around virtqueue allocation and freeing operations, ensuring that buffers are handled in terms of page-size units. Signed-off-by: Will Deacon <[email protected]> [ Paul: pick from the Android tree. Rebase to the upstream ] Signed-off-by: Ying-Chun Liu (PaulLiu) <[email protected]> Cc: Bin Meng <[email protected]> Link: https://android.googlesource.com/platform/external/u-boot/+/b4bb5227d4cf4fdfcd8b4e1ff2692d3a54d1482a Reviewed-by: Simon Glass <[email protected]>
2022-06-08virtio_ring: Check used descriptors are chain headsAndrew Scull
When the device returns used buffers, it should refer to the descriptor that is the head of the descriptor chain for that buffer. Confirm this to be the case by tracking the head of descriptor chains that have been made available to the device. Signed-off-by: Andrew Scull <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-06-08virtio_ring: Maintain a shadow copy of descriptorsAndrew Scull
The shared descriptors should only be written by the guest driver, however, the device is still able to overwrite and corrupt them. Maintain a private shadow copy of the descriptors for the driver to use for state tracking, removing the need to read from the shared descriptors. Signed-off-by: Andrew Scull <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2018-11-14virtio: Add codes for virtual queue/ring managementTuomas Tynkkynen
This adds support for managing virtual queue/ring, the channel for high performance I/O between host and guest. Signed-off-by: Tuomas Tynkkynen <[email protected]> Signed-off-by: Bin Meng <[email protected]> Reviewed-by: Simon Glass <[email protected]>