]> git.dujemihanovic.xyz Git - u-boot.git/commit
virtio_ring: Maintain a shadow copy of descriptors
authorAndrew Scull <ascull@google.com>
Mon, 16 May 2022 10:41:31 +0000 (10:41 +0000)
committerTom Rini <trini@konsulko.com>
Wed, 8 Jun 2022 13:24:03 +0000 (09:24 -0400)
commit10a14536366350fdd2d14af1981d9e3d8cb3c524
tree1ea7fac183ce3f796db30a3bca8267a5500c2e57
parentb0952977c98affb9054aa5ba6a79291a293c8824
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>
drivers/virtio/virtio_ring.c
include/virtio_ring.h