First implementation of config_changed for lguest (untested)
---
 drivers/lguest/lguest_device.c  |   18 +++++++++++++++++-
 include/linux/lguest_launcher.h |    2 ++
 2 files changed, 19 insertions(+), 1 deletion(-)

diff -r 0f7b818d71a5 drivers/lguest/lguest_device.c
--- a/drivers/lguest/lguest_device.c	Wed Jan 16 13:03:31 2008 +1100
+++ b/drivers/lguest/lguest_device.c	Wed Jan 16 13:05:17 2008 +1100
@@ -181,6 +181,22 @@ static void lg_notify(struct virtqueue *
 	hcall(LHCALL_NOTIFY, lvq->config.pfn << PAGE_SHIFT, 0, 0);
 }
 
+static irqreturn_t lguest_interrupt(int irq, void *_vq)
+{
+	struct virtqueue *vq = _vq;
+	struct lguest_device_desc *desc = to_lgdev(vq->vdev)->desc;
+
+	if (unlikely(desc->config_change)) {
+		struct virtio_driver *drv;
+		drv = container_of(vq->vdev->dev.driver, struct virtio_driver,
+				   driver);
+		if (drv->config_changed)
+			drv->config_changed(vq->vdev);
+		desc->config_change = 0;
+	}
+	return vring_interrupt(irq, vq);
+}
+
 /* This routine finds the first virtqueue described in the configuration of
  * this device and sets it up.
  *
@@ -239,7 +255,7 @@ static struct virtqueue *lg_find_vq(stru
 	/* FIXME: We used to have a flag for the Host to tell us we could use
 	 * the interrupt as a source of randomness: it'd be nice to have that
 	 * back.. */
-	err = request_irq(lvq->config.irq, vring_interrupt, IRQF_SHARED,
+	err = request_irq(lvq->config.irq, lguest_interrupt, IRQF_SHARED,
 			  vdev->dev.bus_id, vq);
 	if (err)
 		goto destroy_vring;
diff -r 0f7b818d71a5 include/linux/lguest_launcher.h
--- a/include/linux/lguest_launcher.h	Wed Jan 16 13:03:31 2008 +1100
+++ b/include/linux/lguest_launcher.h	Wed Jan 16 13:05:17 2008 +1100
@@ -30,6 +30,8 @@ struct lguest_device_desc {
 	__u8 feature_len;
 	/* The number of bytes of the config array after virtqueues. */
 	__u8 config_len;
+	/* Change indication, set by Host and cleared by Guest */
+	__u8 config_change;
 	/* A status byte, written by the Guest. */
 	__u8 status;
 	__u8 config[0];
