diff options
author | Glauber de Oliveira Costa <gcosta@redhat.com> | 2008-01-07 08:05:25 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-01-30 06:50:06 -0500 |
commit | d0953d42c3445a120299fac9ad70e672d77898e9 (patch) | |
tree | a631abb2c154bec66cec05508423da705d02f35b /drivers/lguest/core.c | |
parent | 4dcc53da49c2387078fe8ceb7a420d125e027fc6 (diff) |
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.c | 6 |
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, | |||
174 | /*H:030 Let's jump straight to the the main loop which runs the Guest. | 174 | /*H:030 Let's jump straight to the the main loop which runs the Guest. |
175 | * Remember, this is called by the Launcher reading /dev/lguest, and we keep | 175 | * Remember, this is called by the Launcher reading /dev/lguest, and we keep |
176 | * going around and around until something interesting happens. */ | 176 | * going around and around until something interesting happens. */ |
177 | int run_guest(struct lguest *lg, unsigned long __user *user) | 177 | int run_guest(struct lg_cpu *cpu, unsigned long __user *user) |
178 | { | 178 | { |
179 | struct lguest *lg = cpu->lg; | ||
180 | |||
179 | /* We stop running once the Guest is dead. */ | 181 | /* We stop running once the Guest is dead. */ |
180 | while (!lg->dead) { | 182 | while (!lg->dead) { |
181 | /* First we run any hypercalls the Guest wants done. */ | 183 | /* First we run any hypercalls the Guest wants done. */ |
@@ -226,7 +228,7 @@ int run_guest(struct lguest *lg, unsigned long __user *user) | |||
226 | local_irq_disable(); | 228 | local_irq_disable(); |
227 | 229 | ||
228 | /* Actually run the Guest until something happens. */ | 230 | /* Actually run the Guest until something happens. */ |
229 | lguest_arch_run_guest(lg); | 231 | lguest_arch_run_guest(cpu); |
230 | 232 | ||
231 | /* Now we're ready to be interrupted or moved to other CPUs */ | 233 | /* Now we're ready to be interrupted or moved to other CPUs */ |
232 | local_irq_enable(); | 234 | local_irq_enable(); |