aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/virtio.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-02 17:14:04 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-02 17:14:04 -0400
commit736a2dd2571ac56b11ed95a7814d838d5311be04 (patch)
treede10d107025970c6e51d5b6faeba799ed4b9caae /include/linux/virtio.h
parent0b2e3b6bb4a415379f16e38fc92db42379be47a1 (diff)
parent01d779a14ef800b74684d9692add4944df052461 (diff)
Merge tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux
Pull virtio & lguest updates from Rusty Russell: "Lots of virtio work which wasn't quite ready for last merge window. Plus I dived into lguest again, reworking the pagetable code so we can move the switcher page: our fixmaps sometimes take more than 2MB now..." Ugh. Annoying conflicts with the tcm_vhost -> vhost_scsi rename. Hopefully correctly resolved. * tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: (57 commits) caif_virtio: Remove bouncing email addresses lguest: improve code readability in lg_cpu_start. virtio-net: fill only rx queues which are being used lguest: map Switcher below fixmap. lguest: cache last cpu we ran on. lguest: map Switcher text whenever we allocate a new pagetable. lguest: don't share Switcher PTE pages between guests. lguest: expost switcher_pages array (as lg_switcher_pages). lguest: extract shadow PTE walking / allocating. lguest: make check_gpte et. al return bool. lguest: assume Switcher text is a single page. lguest: rename switcher_page to switcher_pages. lguest: remove RESERVE_MEM constant. lguest: check vaddr not pgd for Switcher protection. lguest: prepare to make SWITCHER_ADDR a variable. virtio: console: replace EMFILE with EBUSY for already-open port virtio-scsi: reset virtqueue affinity when doing cpu hotplug virtio-scsi: introduce multiqueue support virtio-scsi: push vq lock/unlock into virtscsi_vq_done virtio-scsi: pass struct virtio_scsi to virtqueue completion function ...
Diffstat (limited to 'include/linux/virtio.h')
-rw-r--r--include/linux/virtio.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/virtio.h b/include/linux/virtio.h
index 2d7a5e045908..9ff8645b7e0b 100644
--- a/include/linux/virtio.h
+++ b/include/linux/virtio.h
@@ -8,6 +8,7 @@
8#include <linux/device.h> 8#include <linux/device.h>
9#include <linux/mod_devicetable.h> 9#include <linux/mod_devicetable.h>
10#include <linux/gfp.h> 10#include <linux/gfp.h>
11#include <linux/vringh.h>
11 12
12/** 13/**
13 * virtqueue - a queue to register buffers for sending or receiving. 14 * virtqueue - a queue to register buffers for sending or receiving.
@@ -40,6 +41,23 @@ int virtqueue_add_buf(struct virtqueue *vq,
40 void *data, 41 void *data,
41 gfp_t gfp); 42 gfp_t gfp);
42 43
44int virtqueue_add_outbuf(struct virtqueue *vq,
45 struct scatterlist sg[], unsigned int num,
46 void *data,
47 gfp_t gfp);
48
49int virtqueue_add_inbuf(struct virtqueue *vq,
50 struct scatterlist sg[], unsigned int num,
51 void *data,
52 gfp_t gfp);
53
54int virtqueue_add_sgs(struct virtqueue *vq,
55 struct scatterlist *sgs[],
56 unsigned int out_sgs,
57 unsigned int in_sgs,
58 void *data,
59 gfp_t gfp);
60
43void virtqueue_kick(struct virtqueue *vq); 61void virtqueue_kick(struct virtqueue *vq);
44 62
45bool virtqueue_kick_prepare(struct virtqueue *vq); 63bool virtqueue_kick_prepare(struct virtqueue *vq);
@@ -64,6 +82,7 @@ unsigned int virtqueue_get_vring_size(struct virtqueue *vq);
64 * @dev: underlying device. 82 * @dev: underlying device.
65 * @id: the device type identification (used to match it with a driver). 83 * @id: the device type identification (used to match it with a driver).
66 * @config: the configuration ops for this device. 84 * @config: the configuration ops for this device.
85 * @vringh_config: configuration ops for host vrings.
67 * @vqs: the list of virtqueues for this device. 86 * @vqs: the list of virtqueues for this device.
68 * @features: the features supported by both driver and device. 87 * @features: the features supported by both driver and device.
69 * @priv: private pointer for the driver's use. 88 * @priv: private pointer for the driver's use.
@@ -73,6 +92,7 @@ struct virtio_device {
73 struct device dev; 92 struct device dev;
74 struct virtio_device_id id; 93 struct virtio_device_id id;
75 const struct virtio_config_ops *config; 94 const struct virtio_config_ops *config;
95 const struct vringh_config_ops *vringh_config;
76 struct list_head vqs; 96 struct list_head vqs;
77 /* Note that this is a Linux set_bit-style bitmap. */ 97 /* Note that this is a Linux set_bit-style bitmap. */
78 unsigned long features[1]; 98 unsigned long features[1];