diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-06-12 22:27:01 -0600 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-06-12 22:27:01 +0930 |
commit | a6c372de6e4b9a8188b66badcee3e3792eccdd26 (patch) | |
tree | b6b67f4cc447cc0ee8ae617bb503ef7d7f6e4958 /drivers/lguest/interrupts_and_traps.c | |
parent | b43e352139f51216a8c56b0bd5fc3d4e05c65619 (diff) |
lguest: fix lguest wake on guest clock tick, or fd activity
The Launcher could be inside the Guest on another CPU; wake_up_process
will do nothing because it is "running". kick_process will knock it
back into our kernel in this case, otherwise we'll miss it until the
next guest exit.
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.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/lguest/interrupts_and_traps.c b/drivers/lguest/interrupts_and_traps.c index 6e99adbe194..9ea26ad88c9 100644 --- a/drivers/lguest/interrupts_and_traps.c +++ b/drivers/lguest/interrupts_and_traps.c @@ -511,9 +511,9 @@ 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->halted) - wake_up_process(cpu->tsk); + /* Guest may be stopped or running on another CPU. */ + if (!wake_up_process(cpu->tsk)) + kick_process(cpu->tsk); return HRTIMER_NORESTART; } |