diff options
| author | Linus Torvalds | 2026-02-13 12:02:18 -0800 |
|---|---|---|
| committer | Linus Torvalds | 2026-02-13 12:02:18 -0800 |
| commit | a353e7260b5951a62dce43630ae9265accd96a4b (patch) | |
| tree | 17718c7136b02a2f63be0b26cd2ff7fffc279bf2 /net | |
| parent | cb5573868ea85ddbc74dd9a917acd1e434d21390 (diff) | |
| parent | ebcff9dacaf2c1418f8bc927388186d7d3674603 (diff) | |
Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Pull virtio updates from Michael Tsirkin:
- in-order support in virtio core
- multiple address space support in vduse
- fixes, cleanups all over the place, notably dma alignment fixes for
non-cache-coherent systems
* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (59 commits)
vduse: avoid adding implicit padding
vhost: fix caching attributes of MMIO regions by setting them explicitly
vdpa/mlx5: update MAC address handling in mlx5_vdpa_set_attr()
vdpa/mlx5: reuse common function for MAC address updates
vdpa/mlx5: update mlx_features with driver state check
crypto: virtio: Replace package id with numa node id
crypto: virtio: Remove duplicated virtqueue_kick in virtio_crypto_skcipher_crypt_req
crypto: virtio: Add spinlock protection with virtqueue notification
Documentation: Add documentation for VDUSE Address Space IDs
vduse: bump version number
vduse: add vq group asid support
vduse: merge tree search logic of IOTLB_GET_FD and IOTLB_GET_INFO ioctls
vduse: take out allocations from vduse_dev_alloc_coherent
vduse: remove unused vaddr parameter of vduse_domain_free_coherent
vduse: refactor vdpa_dev_add for goto err handling
vhost: forbid change vq groups ASID if DRIVER_OK is set
vdpa: document set_group_asid thread safety
vduse: return internal vq group struct as map token
vduse: add vq group support
vduse: add v1 API definition
...
Diffstat (limited to 'net')
| -rw-r--r-- | net/vmw_vsock/virtio_transport.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c index 3f7ea2db9bd7..357e80ac3f3a 100644 --- a/net/vmw_vsock/virtio_transport.c +++ b/net/vmw_vsock/virtio_transport.c @@ -17,6 +17,7 @@ #include <linux/virtio_ids.h> #include <linux/virtio_config.h> #include <linux/virtio_vsock.h> +#include <linux/dma-mapping.h> #include <net/sock.h> #include <linux/mutex.h> #include <net/af_vsock.h> @@ -54,13 +55,6 @@ struct virtio_vsock { int rx_buf_nr; int rx_buf_max_nr; - /* The following fields are protected by event_lock. - * vqs[VSOCK_VQ_EVENT] must be accessed with event_lock held. - */ - struct mutex event_lock; - bool event_run; - struct virtio_vsock_event event_list[8]; - u32 guest_cid; bool seqpacket_allow; @@ -74,6 +68,15 @@ struct virtio_vsock { */ struct scatterlist *out_sgs[MAX_SKB_FRAGS + 1]; struct scatterlist out_bufs[MAX_SKB_FRAGS + 1]; + + /* The following fields are protected by event_lock. + * vqs[VSOCK_VQ_EVENT] must be accessed with event_lock held. + */ + struct mutex event_lock; + bool event_run; + __dma_from_device_group_begin(); + struct virtio_vsock_event event_list[8]; + __dma_from_device_group_end(); }; static u32 virtio_transport_get_local_cid(void) @@ -390,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 */ |
