aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lguest/lguest_device.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-07-30 18:03:45 -0400
committerRusty Russell <rusty@rustcorp.com.au>2009-07-30 02:33:46 -0400
commita91d74a3c4de8115295ee87350c13a329164aaaf (patch)
tree02c862fccc9abedf7fc354061e69c4b5fbcce06d /drivers/lguest/lguest_device.c
parent2e04ef76916d1e29a077ea9d0f2003c8fd86724d (diff)
lguest: update commentry
Every so often, after code shuffles, I need to go through and unbitrot the Lguest Journey (see drivers/lguest/README). Since we now use RCU in a simple form in one place I took the opportunity to expand that explanation. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Ingo Molnar <mingo@redhat.com> Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'drivers/lguest/lguest_device.c')
-rw-r--r--drivers/lguest/lguest_device.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/lguest/lguest_device.c b/drivers/lguest/lguest_device.c
index cc000e79c3d1..1401c1ace1ec 100644
--- a/drivers/lguest/lguest_device.c
+++ b/drivers/lguest/lguest_device.c
@@ -236,7 +236,7 @@ static void lg_notify(struct virtqueue *vq)
236extern void lguest_setup_irq(unsigned int irq); 236extern void lguest_setup_irq(unsigned int irq);
237 237
238/* 238/*
239 * This routine finds the first virtqueue described in the configuration of 239 * This routine finds the Nth virtqueue described in the configuration of
240 * this device and sets it up. 240 * this device and sets it up.
241 * 241 *
242 * This is kind of an ugly duckling. It'd be nicer to have a standard 242 * This is kind of an ugly duckling. It'd be nicer to have a standard
@@ -244,9 +244,6 @@ extern void lguest_setup_irq(unsigned int irq);
244 * everyone wants to do it differently. The KVM coders want the Guest to 244 * everyone wants to do it differently. The KVM coders want the Guest to
245 * allocate its own pages and tell the Host where they are, but for lguest it's 245 * allocate its own pages and tell the Host where they are, but for lguest it's
246 * simpler for the Host to simply tell us where the pages are. 246 * simpler for the Host to simply tell us where the pages are.
247 *
248 * So we provide drivers with a "find the Nth virtqueue and set it up"
249 * function.
250 */ 247 */
251static struct virtqueue *lg_find_vq(struct virtio_device *vdev, 248static struct virtqueue *lg_find_vq(struct virtio_device *vdev,
252 unsigned index, 249 unsigned index,
@@ -422,7 +419,11 @@ static void add_lguest_device(struct lguest_device_desc *d,
422 419
423 /* This devices' parent is the lguest/ dir. */ 420 /* This devices' parent is the lguest/ dir. */
424 ldev->vdev.dev.parent = lguest_root; 421 ldev->vdev.dev.parent = lguest_root;
425 /* We have a unique device index thanks to the dev_index counter. */ 422 /*
423 * The device type comes straight from the descriptor. There's also a
424 * device vendor field in the virtio_device struct, which we leave as
425 * 0.
426 */
426 ldev->vdev.id.device = d->type; 427 ldev->vdev.id.device = d->type;
427 /* 428 /*
428 * We have a simple set of routines for querying the device's 429 * We have a simple set of routines for querying the device's