Files
linux/drivers/char/hw_random
Michael S. Tsirkin bd2b617c49 virtio-rng: fix DMA alignment for data buffer
The data buffer in struct virtrng_info is used for DMA_FROM_DEVICE via
virtqueue_add_inbuf() and shares cachelines with the adjacent
CPU-written fields (data_avail, data_idx).

The device writing to the DMA buffer and the CPU writing to adjacent
fields could corrupt each other's data on non-cache-coherent platforms.

Add __dma_from_device_group_begin()/end() annotations to place these
in distinct cache lines.

Message-ID: <157a63b6324d1f1307ddd4faa3b62a8b90a79423.1767601130.git.mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2026-01-08 09:54:27 -05:00
..
2024-03-08 19:23:24 +08:00
2025-02-09 18:08:12 +08:00
2023-10-05 18:16:31 +08:00
2025-11-24 11:45:21 +01:00
2023-09-15 18:29:45 +08:00
2022-07-22 16:22:04 +08:00