diff options
| author | Michael S. Tsirkin <mst@redhat.com> | 2025-12-29 18:23:53 -0500 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2026-01-08 09:54:19 -0500 |
| commit | 63dfad0517f0418a5192024fad934be79c2f5902 (patch) | |
| tree | e66e4eae251c6d496157b87a20598192363a07bb /Documentation/process/debugging | |
| parent | 5fc6dd158e97d317aeb85ea930613f8db172603b (diff) | |
vsock/virtio: fix DMA alignment for event_list
On non-cache-coherent platforms, when a structure contains a buffer
used for DMA alongside fields that the CPU writes to, cacheline sharing
can cause data corruption.
The event_list array is used for DMA_FROM_DEVICE operations via
virtqueue_add_inbuf(). The adjacent event_run and guest_cid fields are
written by the CPU while the buffer is available, so mapped for the
device. If these share cachelines with event_list, CPU writes can
corrupt DMA data.
Add __dma_from_device_group_begin()/end() annotations to ensure event_list
is isolated in its own cachelines.
Message-ID: <f19ebd74f70c91cab4b0178df78cf6a6e107a96b.1767601130.git.mst@redhat.com>
Acked-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'Documentation/process/debugging')
0 files changed, 0 insertions, 0 deletions
