diff options
Diffstat (limited to 'drivers/lguest/lguest_device.c')
-rw-r--r-- | drivers/lguest/lguest_device.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/lguest/lguest_device.c b/drivers/lguest/lguest_device.c index 1b2ec0bf5eb1..2bc9bf7e88e5 100644 --- a/drivers/lguest/lguest_device.c +++ b/drivers/lguest/lguest_device.c | |||
@@ -1,10 +1,10 @@ | |||
1 | /*P:050 Lguest guests use a very simple method to describe devices. It's a | 1 | /*P:050 Lguest guests use a very simple method to describe devices. It's a |
2 | * series of device descriptors contained just above the top of normal | 2 | * series of device descriptors contained just above the top of normal Guest |
3 | * memory. | 3 | * memory. |
4 | * | 4 | * |
5 | * We use the standard "virtio" device infrastructure, which provides us with a | 5 | * We use the standard "virtio" device infrastructure, which provides us with a |
6 | * console, a network and a block driver. Each one expects some configuration | 6 | * console, a network and a block driver. Each one expects some configuration |
7 | * information and a "virtqueue" mechanism to send and receive data. :*/ | 7 | * information and a "virtqueue" or two to send and receive data. :*/ |
8 | #include <linux/init.h> | 8 | #include <linux/init.h> |
9 | #include <linux/bootmem.h> | 9 | #include <linux/bootmem.h> |
10 | #include <linux/lguest_launcher.h> | 10 | #include <linux/lguest_launcher.h> |
@@ -53,7 +53,7 @@ struct lguest_device { | |||
53 | * Device configurations | 53 | * Device configurations |
54 | * | 54 | * |
55 | * The configuration information for a device consists of one or more | 55 | * The configuration information for a device consists of one or more |
56 | * virtqueues, a feature bitmaks, and some configuration bytes. The | 56 | * virtqueues, a feature bitmap, and some configuration bytes. The |
57 | * configuration bytes don't really matter to us: the Launcher sets them up, and | 57 | * configuration bytes don't really matter to us: the Launcher sets them up, and |
58 | * the driver will look at them during setup. | 58 | * the driver will look at them during setup. |
59 | * | 59 | * |
@@ -179,7 +179,7 @@ struct lguest_vq_info | |||
179 | }; | 179 | }; |
180 | 180 | ||
181 | /* When the virtio_ring code wants to prod the Host, it calls us here and we | 181 | /* When the virtio_ring code wants to prod the Host, it calls us here and we |
182 | * make a hypercall. We hand the page number of the virtqueue so the Host | 182 | * make a hypercall. We hand the physical address of the virtqueue so the Host |
183 | * knows which virtqueue we're talking about. */ | 183 | * knows which virtqueue we're talking about. */ |
184 | static void lg_notify(struct virtqueue *vq) | 184 | static void lg_notify(struct virtqueue *vq) |
185 | { | 185 | { |
@@ -199,7 +199,8 @@ static void lg_notify(struct virtqueue *vq) | |||
199 | * allocate its own pages and tell the Host where they are, but for lguest it's | 199 | * allocate its own pages and tell the Host where they are, but for lguest it's |
200 | * simpler for the Host to simply tell us where the pages are. | 200 | * simpler for the Host to simply tell us where the pages are. |
201 | * | 201 | * |
202 | * So we provide devices with a "find virtqueue and set it up" function. */ | 202 | * So we provide drivers with a "find the Nth virtqueue and set it up" |
203 | * function. */ | ||
203 | static struct virtqueue *lg_find_vq(struct virtio_device *vdev, | 204 | static struct virtqueue *lg_find_vq(struct virtio_device *vdev, |
204 | unsigned index, | 205 | unsigned index, |
205 | void (*callback)(struct virtqueue *vq)) | 206 | void (*callback)(struct virtqueue *vq)) |