]> git.baikalelectronics.ru Git - uboot.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)
commitbc14c289d97db9a182708158f199f53136276b7f
tree1ea7fac183ce3f796db30a3bca8267a5500c2e57
parent5abe6ea83024f59e02112e0c43a577caeaaf64b2
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