History log of /u-boot/include/virtio_ring.h
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 37e53db3 29-Mar-2023 Will Deacon <willdeacon@google.com>

virtio: Allocate bounce buffers for devices with VIRTIO_F_IOMMU_PLATFORM

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 <willdeacon@google.com>
[ Paul: pick from the Android tree. Rebase to the upstream ]
Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Link: https://android.googlesource.com/platform/external/u-boot/+/3e052749e7c50c4c1a6014e645ae3b9be3710c07
Reviewed-by: Simon Glass <sjg@chromium.org>

# 75582fc2 29-Mar-2023 Will Deacon <willdeacon@google.com>

virtio: Allocate virtqueue in page-size units

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 <willdeacon@google.com>
[ Paul: pick from the Android tree. Rebase to the upstream ]
Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Link: https://android.googlesource.com/platform/external/u-boot/+/b4bb5227d4cf4fdfcd8b4e1ff2692d3a54d1482a
Reviewed-by: Simon Glass <sjg@chromium.org>

# fbef3f53 16-May-2022 Andrew Scull <ascull@google.com>

virtio_ring: Check used descriptors are chain heads

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 <ascull@google.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 10a14536 16-May-2022 Andrew Scull <ascull@google.com>

virtio_ring: Maintain a shadow copy of descriptors

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 <ascull@google.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# c011641e 15-Oct-2018 Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>

virtio: Add codes for virtual queue/ring management

This adds support for managing virtual queue/ring, the channel
for high performance I/O between host and guest.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# fbef3f53 16-May-2022 Andrew Scull <ascull@google.com>

virtio_ring: Check used descriptors are chain heads

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 <ascull@google.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# 10a14536 16-May-2022 Andrew Scull <ascull@google.com>

virtio_ring: Maintain a shadow copy of descriptors

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 <ascull@google.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# c011641e 15-Oct-2018 Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>

virtio: Add codes for virtual queue/ring management

This adds support for managing virtual queue/ring, the channel
for high performance I/O between host and guest.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

# c011641e 15-Oct-2018 Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>

virtio: Add codes for virtual queue/ring management

This adds support for managing virtual queue/ring, the channel
for high performance I/O between host and guest.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>