diff options
Diffstat (limited to 'drivers/lguest/core.c')
-rw-r--r-- | drivers/lguest/core.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/lguest/core.c b/drivers/lguest/core.c index 8ca1def5b14..03fbc88c002 100644 --- a/drivers/lguest/core.c +++ b/drivers/lguest/core.c | |||
@@ -189,6 +189,7 @@ int run_guest(struct lg_cpu *cpu, unsigned long __user *user) | |||
189 | /* We stop running once the Guest is dead. */ | 189 | /* We stop running once the Guest is dead. */ |
190 | while (!cpu->lg->dead) { | 190 | while (!cpu->lg->dead) { |
191 | unsigned int irq; | 191 | unsigned int irq; |
192 | bool more; | ||
192 | 193 | ||
193 | /* First we run any hypercalls the Guest wants done. */ | 194 | /* First we run any hypercalls the Guest wants done. */ |
194 | if (cpu->hcall) | 195 | if (cpu->hcall) |
@@ -213,9 +214,9 @@ int run_guest(struct lg_cpu *cpu, unsigned long __user *user) | |||
213 | /* Check if there are any interrupts which can be delivered now: | 214 | /* Check if there are any interrupts which can be delivered now: |
214 | * if so, this sets up the hander to be executed when we next | 215 | * if so, this sets up the hander to be executed when we next |
215 | * run the Guest. */ | 216 | * run the Guest. */ |
216 | irq = interrupt_pending(cpu); | 217 | irq = interrupt_pending(cpu, &more); |
217 | if (irq < LGUEST_IRQS) | 218 | if (irq < LGUEST_IRQS) |
218 | try_deliver_interrupt(cpu, irq); | 219 | try_deliver_interrupt(cpu, irq, more); |
219 | 220 | ||
220 | /* All long-lived kernel loops need to check with this horrible | 221 | /* All long-lived kernel loops need to check with this horrible |
221 | * thing called the freezer. If the Host is trying to suspend, | 222 | * thing called the freezer. If the Host is trying to suspend, |
@@ -233,7 +234,7 @@ int run_guest(struct lg_cpu *cpu, unsigned long __user *user) | |||
233 | set_current_state(TASK_INTERRUPTIBLE); | 234 | set_current_state(TASK_INTERRUPTIBLE); |
234 | /* Just before we sleep, make sure nothing snuck in | 235 | /* Just before we sleep, make sure nothing snuck in |
235 | * which we should be doing. */ | 236 | * which we should be doing. */ |
236 | if (interrupt_pending(cpu) < LGUEST_IRQS | 237 | if (interrupt_pending(cpu, &more) < LGUEST_IRQS |
237 | || cpu->break_out) | 238 | || cpu->break_out) |
238 | set_current_state(TASK_RUNNING); | 239 | set_current_state(TASK_RUNNING); |
239 | else | 240 | else |