summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2025-12-29 18:27:54 -0500
committerMichael S. Tsirkin <mst@redhat.com>2026-01-08 09:54:26 -0500
commitdb191ba0c8564ff84877e5b1c9553e991feca239 (patch)
tree0edaa85d57fccdb452692356378604d15fcb942b /net
parent63dfad0517f0418a5192024fad934be79c2f5902 (diff)
vsock/virtio: use virtqueue_add_inbuf_cache_clean for events
The event_list array contains 8 small (4-byte) 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. The previous patch isolated event_list in its own cache lines so the warnings are spurious. Use virtqueue_add_inbuf_cache_clean() to indicate that the CPU does not write into these fields, suppressing the warnings. Reported-by: Cong Wang <xiyou.wangcong@gmail.com> Message-ID: <4b5bf63a7ebb782d87f643466b3669df567c9fe1.1767601130.git.mst@redhat.com> Acked-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'net')
-rw-r--r--net/vmw_vsock/virtio_transport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c
index 3de2b2d49b51..999a0839726a 100644
--- a/net/vmw_vsock/virtio_transport.c
+++ b/net/vmw_vsock/virtio_transport.c
@@ -393,7 +393,7 @@ static int virtio_vsock_event_fill_one(struct virtio_vsock *vsock,
sg_init_one(&sg, event, sizeof(*event));
- return virtqueue_add_inbuf(vq, &sg, 1, event, GFP_KERNEL);
+ return virtqueue_add_inbuf_cache_clean(vq, &sg, 1, event, GFP_KERNEL);
}
/* event_lock must be held */