---
 drivers/lguest/core.c        |    1 +
 drivers/lguest/lg.h          |    1 +
 drivers/lguest/lguest_user.c |    3 +++
 3 files changed, 5 insertions(+)

diff --git a/drivers/lguest/core.c b/drivers/lguest/core.c
--- a/drivers/lguest/core.c
+++ b/drivers/lguest/core.c
@@ -237,6 +237,7 @@ int run_guest(struct lg_cpu *cpu, unsign
 
 		/* Actually run the Guest until something happens. */
 		lguest_arch_run_guest(cpu);
+		cpu->lg->exits++;
 
 		/* Now we're ready to be interrupted or moved to other CPUs */
 		local_irq_enable();
diff --git a/drivers/lguest/lg.h b/drivers/lguest/lg.h
--- a/drivers/lguest/lg.h
+++ b/drivers/lguest/lg.h
@@ -88,6 +88,7 @@ struct lguest
 	struct lguest_data __user *lguest_data;
 	struct lg_cpu cpus[NR_CPUS];
 	unsigned int nr_cpus;
+	unsigned long exits;
 
 	u32 pfn_limit;
 	/* This provides the offset to the base of guest-physical
diff --git a/drivers/lguest/lguest_user.c b/drivers/lguest/lguest_user.c
--- a/drivers/lguest/lguest_user.c
+++ b/drivers/lguest/lguest_user.c
@@ -307,6 +307,9 @@ static int close(struct inode *inode, st
 	 * kmalloc()ed string, either of which is ok to hand to kfree(). */
 	if (!IS_ERR(lg->dead))
 		kfree(lg->dead);
+
+	printk("Guest Exits: %lu\n", lg->exits);
+
 	/* Free the memory allocated to the lguest_struct */
 	kfree(lg);
 	/* Release lock and exit. */
