Files
linux/drivers/scsi
Michael S. Tsirkin 2678369e8e virtio_scsi: fix DMA cacheline issues for events
Current struct virtio_scsi_event_node layout has two problems:

The event (DMA_FROM_DEVICE) and work (CPU-written via
INIT_WORK/queue_work) fields share a cacheline.
On non-cache-coherent platforms, CPU writes to work can
corrupt device-written event data.

If ARCH_DMA_MINALIGN is large enough, the 8 events in event_list share
cachelines, triggering CONFIG_DMA_API_DEBUG warnings.

Fix the corruption by moving event buffers to a separate array and
aligning using __dma_from_device_group_begin()/end().

Suppress the (now spurious) DMA debug warnings using
virtqueue_add_inbuf_cache_clean().

Message-ID: <8801aeef7576a155299f19b6887682dd3a272aba.1767601130.git.mst@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2026-01-08 09:54:27 -05:00
..
2025-11-19 12:30:11 +01:00
2024-12-09 21:59:52 -05:00
2024-12-09 21:59:52 -05:00
2024-03-10 18:15:48 -04:00
2024-12-09 21:59:52 -05:00
2025-01-02 13:42:35 -05:00
2024-12-09 21:59:52 -05:00
2025-02-03 18:04:55 -05:00
2024-08-12 22:05:50 -04:00
2024-08-12 22:05:50 -04:00
2024-12-09 21:59:52 -05:00
2025-11-05 08:07:21 -07:00
2025-11-05 08:07:21 -07:00
2025-11-19 22:46:36 -05:00
2025-08-30 21:46:21 -04:00