summaryrefslogtreecommitdiff
path: root/net/vmw_vsock/virtio_transport.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/vmw_vsock/virtio_transport.c')
-rw-r--r--net/vmw_vsock/virtio_transport.c19
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 */