]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
virtio_input: use virtqueue_add_inbuf_cache_clean for events
authorMichael S. Tsirkin <mst@redhat.com>
Mon, 29 Dec 2025 23:28:28 +0000 (18:28 -0500)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 8 Jan 2026 14:54:27 +0000 (09:54 -0500)
commitd08fda2cf2e68b4e0865f1bf0b49010db74da079
treedd6e82bf89b285d6f7e5b43276aa9ce86a417061
parentbd2b617c49820a38cefcf512c6d56d30deb59aa9
virtio_input: use virtqueue_add_inbuf_cache_clean for events

The evts array contains 64 small (8-byte) input events that share
cachelines with each other. When CONFIG_DMA_API_DEBUG is enabled,
this can trigger warnings about overlapping DMA mappings within
the same cacheline.

Previous patch isolated the array in its own cachelines,
so the warnings are now spurious.

Use virtqueue_add_inbuf_cache_clean() to indicate that the CPU does not
write into these cache lines, suppressing these warnings.

Message-ID: <4c885b4046323f68cf5cadc7fbfb00216b11dd20.1767601130.git.mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/virtio/virtio_input.c