summaryrefslogtreecommitdiffstats
path: root/drivers/lguest/core.c
diff options
context:
space:
mode:
authorGlauber de Oliveira Costa <gcosta@redhat.com>2008-01-07 14:05:25 +0100
committerRusty Russell <rusty@rustcorp.com.au>2008-01-30 12:50:06 +0100
commitd0953d42c3445a120299fac9ad70e672d77898e9 (patch)
treea631abb2c154bec66cec05508423da705d02f35b /drivers/lguest/core.c
parentlguest: initialize vcpu (diff)
downloadlinux-d0953d42c3445a120299fac9ad70e672d77898e9.tar.xz
linux-d0953d42c3445a120299fac9ad70e672d77898e9.zip
lguest: per-cpu run guest
This patch makes the run_guest() routine use the lg_cpu struct. This is required since in a smp guest environment, there's no more the notion of "running the guest", but rather, it is "running the vcpu" Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/lguest/core.c')
-rw-r--r--drivers/lguest/core.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/lguest/core.c b/drivers/lguest/core.c
index c1069bceba11..75b38f2c778a 100644
--- a/drivers/lguest/core.c
+++ b/drivers/lguest/core.c
@@ -174,8 +174,10 @@ void __lgwrite(struct lguest *lg, unsigned long addr, const void *b,
/*H:030 Let's jump straight to the the main loop which runs the Guest.
* Remember, this is called by the Launcher reading /dev/lguest, and we keep
* going around and around until something interesting happens. */
-int run_guest(struct lguest *lg, unsigned long __user *user)
+int run_guest(struct lg_cpu *cpu, unsigned long __user *user)
{
+ struct lguest *lg = cpu->lg;
+
/* We stop running once the Guest is dead. */
while (!lg->dead) {
/* First we run any hypercalls the Guest wants done. */
@@ -226,7 +228,7 @@ int run_guest(struct lguest *lg, unsigned long __user *user)
local_irq_disable();
/* Actually run the Guest until something happens. */
- lguest_arch_run_guest(lg);
+ lguest_arch_run_guest(cpu);
/* Now we're ready to be interrupted or moved to other CPUs */
local_irq_enable();