diff options
Diffstat (limited to 'drivers/vhost/vhost.h')
-rw-r--r-- | drivers/vhost/vhost.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 1125af3d27d1..5e19e3d5db8c 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h | |||
@@ -7,17 +7,11 @@ | |||
7 | #include <linux/mutex.h> | 7 | #include <linux/mutex.h> |
8 | #include <linux/poll.h> | 8 | #include <linux/poll.h> |
9 | #include <linux/file.h> | 9 | #include <linux/file.h> |
10 | #include <linux/skbuff.h> | ||
11 | #include <linux/uio.h> | 10 | #include <linux/uio.h> |
12 | #include <linux/virtio_config.h> | 11 | #include <linux/virtio_config.h> |
13 | #include <linux/virtio_ring.h> | 12 | #include <linux/virtio_ring.h> |
14 | #include <linux/atomic.h> | 13 | #include <linux/atomic.h> |
15 | 14 | ||
16 | /* This is for zerocopy, used buffer len is set to 1 when lower device DMA | ||
17 | * done */ | ||
18 | #define VHOST_DMA_DONE_LEN 1 | ||
19 | #define VHOST_DMA_CLEAR_LEN 0 | ||
20 | |||
21 | struct vhost_device; | 15 | struct vhost_device; |
22 | 16 | ||
23 | struct vhost_work; | 17 | struct vhost_work; |
@@ -70,6 +64,8 @@ struct vhost_ubuf_ref *vhost_ubuf_alloc(struct vhost_virtqueue *, bool zcopy); | |||
70 | void vhost_ubuf_put(struct vhost_ubuf_ref *); | 64 | void vhost_ubuf_put(struct vhost_ubuf_ref *); |
71 | void vhost_ubuf_put_and_wait(struct vhost_ubuf_ref *); | 65 | void vhost_ubuf_put_and_wait(struct vhost_ubuf_ref *); |
72 | 66 | ||
67 | struct ubuf_info; | ||
68 | |||
73 | /* The virtqueue structure describes a queue attached to a device. */ | 69 | /* The virtqueue structure describes a queue attached to a device. */ |
74 | struct vhost_virtqueue { | 70 | struct vhost_virtqueue { |
75 | struct vhost_dev *dev; | 71 | struct vhost_dev *dev; |
@@ -167,6 +163,7 @@ long vhost_dev_init(struct vhost_dev *, struct vhost_virtqueue *vqs, int nvqs); | |||
167 | long vhost_dev_check_owner(struct vhost_dev *); | 163 | long vhost_dev_check_owner(struct vhost_dev *); |
168 | long vhost_dev_reset_owner(struct vhost_dev *); | 164 | long vhost_dev_reset_owner(struct vhost_dev *); |
169 | void vhost_dev_cleanup(struct vhost_dev *, bool locked); | 165 | void vhost_dev_cleanup(struct vhost_dev *, bool locked); |
166 | void vhost_dev_stop(struct vhost_dev *); | ||
170 | long vhost_dev_ioctl(struct vhost_dev *, unsigned int ioctl, unsigned long arg); | 167 | long vhost_dev_ioctl(struct vhost_dev *, unsigned int ioctl, unsigned long arg); |
171 | int vhost_vq_access_ok(struct vhost_virtqueue *vq); | 168 | int vhost_vq_access_ok(struct vhost_virtqueue *vq); |
172 | int vhost_log_access_ok(struct vhost_dev *); | 169 | int vhost_log_access_ok(struct vhost_dev *); |
@@ -191,8 +188,6 @@ bool vhost_enable_notify(struct vhost_dev *, struct vhost_virtqueue *); | |||
191 | 188 | ||
192 | int vhost_log_write(struct vhost_virtqueue *vq, struct vhost_log *log, | 189 | int vhost_log_write(struct vhost_virtqueue *vq, struct vhost_log *log, |
193 | unsigned int log_num, u64 len); | 190 | unsigned int log_num, u64 len); |
194 | void vhost_zerocopy_callback(struct ubuf_info *); | ||
195 | int vhost_zerocopy_signal_used(struct vhost_virtqueue *vq); | ||
196 | 191 | ||
197 | #define vq_err(vq, fmt, ...) do { \ | 192 | #define vq_err(vq, fmt, ...) do { \ |
198 | pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \ | 193 | pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \ |