aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lguest/interrupts_and_traps.c
diff options
context:
space:
mode:
authorGlauber de Oliveira Costa <gcosta@redhat.com>2008-01-07 11:05:34 -0200
committerRusty Russell <rusty@rustcorp.com.au>2008-01-30 22:50:12 +1100
commit66686c2ab08feb721ca4d98285fba64acdf6017f (patch)
treebae76c0e0dc78809abc83b8f0dc9f84dca702de0 /drivers/lguest/interrupts_and_traps.c
parentfc708b3e407dfd2e12ba9a6cf35bd0bffad1796d (diff)
downloadkernel_goldelico_gta04-66686c2ab08feb721ca4d98285fba64acdf6017f.zip
kernel_goldelico_gta04-66686c2ab08feb721ca4d98285fba64acdf6017f.tar.gz
kernel_goldelico_gta04-66686c2ab08feb721ca4d98285fba64acdf6017f.tar.bz2
lguest: per-vcpu lguest task management
lguest uses tasks to control its running behaviour (like sending breaks, controlling halted state, etc). In a per-vcpu environment, each vcpu will have its own underlying task. So this patch makes the infrastructure for that possible Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/lguest/interrupts_and_traps.c')
-rw-r--r--drivers/lguest/interrupts_and_traps.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/lguest/interrupts_and_traps.c b/drivers/lguest/interrupts_and_traps.c
index 306b93c..9c1c479 100644
--- a/drivers/lguest/interrupts_and_traps.c
+++ b/drivers/lguest/interrupts_and_traps.c
@@ -161,11 +161,11 @@ void maybe_do_interrupt(struct lg_cpu *cpu)
return;
/* If they're halted, interrupts restart them. */
- if (lg->halted) {
+ if (cpu->halted) {
/* Re-enable interrupts. */
if (put_user(X86_EFLAGS_IF, &lg->lguest_data->irq_enabled))
kill_guest(lg, "Re-enabling interrupts");
- lg->halted = 0;
+ cpu->halted = 0;
} else {
/* Otherwise we check if they have interrupts disabled. */
u32 irq_enabled;
@@ -497,8 +497,8 @@ static enum hrtimer_restart clockdev_fn(struct hrtimer *timer)
/* Remember the first interrupt is the timer interrupt. */
set_bit(0, cpu->irqs_pending);
/* If the Guest is actually stopped, we need to wake it up. */
- if (cpu->lg->halted)
- wake_up_process(cpu->lg->tsk);
+ if (cpu->halted)
+ wake_up_process(cpu->tsk);
return HRTIMER_NORESTART;
}