]> git.baikalelectronics.ru Git - uboot.git/commit
virtio: Use bounce buffers when VIRTIO_F_IOMMU_PLATFORM is set
authorWill Deacon <willdeacon@google.com>
Wed, 29 Mar 2023 14:25:00 +0000 (22:25 +0800)
committerTom Rini <trini@konsulko.com>
Tue, 25 Apr 2023 15:53:15 +0000 (11:53 -0400)
commit280cc0cdf61569641b4e77ca2520c92f44b9a6ea
treedd96eae340d934015017a673ef06127c49c7a645
parentbd45b74f869fea6ac03d1b3aa43455425b94a042
virtio: Use bounce buffers when VIRTIO_F_IOMMU_PLATFORM is set

Devices advertising the VIRTIO_F_IOMMU_PLATFORM feature require
platform-specific handling to configure their DMA transactions.

When handling virtio descriptors for such a device, use bounce
buffers to ensure that the underlying buffers are always aligned
to and padded to PAGE_SIZE in preparation for platform specific
handling at page granularity.

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/+/1eff171e613ee67dca71dbe97be7282e2db17011
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/virtio/virtio_ring.c