diff options
| author | Michael S. Tsirkin <mst@redhat.com> | 2025-12-29 18:25:16 -0500 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2026-01-08 09:54:27 -0500 |
| commit | 2678369e8efe0c5ac71adb49fbc2c240a222e44d (patch) | |
| tree | 9cbfa7d5d59848490320300b08f6ec792fd20541 /scripts | |
| parent | 95c7b0ad6c69d1c0608ff0bbd358a546856beaf3 (diff) | |
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>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
