summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2025-12-29 18:24:36 -0500
committerMichael S. Tsirkin <mst@redhat.com>2026-01-08 09:54:26 -0500
commit95c7b0ad6c69d1c0608ff0bbd358a546856beaf3 (patch)
treef4fed8c40e9fcb26c48004ddf5dec6fcefa9598e /include/uapi
parentdb191ba0c8564ff84877e5b1c9553e991feca239 (diff)
virtio_input: fix DMA alignment for evts
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 evts array is used for DMA_FROM_DEVICE operations via virtqueue_add_inbuf(). The adjacent lock and ready fields are written by the CPU during normal operation. If these share cachelines with evts, CPU writes can corrupt DMA data. Add __dma_from_device_group_begin()/end() annotations to ensure evts is isolated in its own cachelines. Message-ID: <cd328233198a76618809bb5cd9a6ddcaa603a8a1.1767601130.git.mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/uapi')
0 files changed, 0 insertions, 0 deletions