aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lguest
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/lguest')
-rw-r--r--drivers/lguest/interrupts_and_traps.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/lguest/interrupts_and_traps.c b/drivers/lguest/interrupts_and_traps.c
index d9de5bbc613f..bee029bb2c7b 100644
--- a/drivers/lguest/interrupts_and_traps.c
+++ b/drivers/lguest/interrupts_and_traps.c
@@ -38,12 +38,12 @@ static void set_guest_interrupt(struct lguest *lg, u32 lo, u32 hi, int has_err)
38 ss = lg->regs->ss; 38 ss = lg->regs->ss;
39 } 39 }
40 40
41 /* We use IF bit in eflags to indicate whether irqs were disabled 41 /* We use IF bit in eflags to indicate whether irqs were enabled
42 (it's always 0, since irqs are enabled when guest is running). */ 42 (it's always 1, since irqs are enabled when guest is running). */
43 eflags = lg->regs->eflags; 43 eflags = lg->regs->eflags;
44 if (get_user(irq_enable, &lg->lguest_data->irq_enabled)) 44 if (get_user(irq_enable, &lg->lguest_data->irq_enabled) == 0
45 irq_enable = 0; 45 && !(irq_enable & X86_EFLAGS_IF))
46 eflags |= (irq_enable & X86_EFLAGS_IF); 46 eflags &= ~X86_EFLAGS_IF;
47 47
48 push_guest_stack(lg, &gstack, eflags); 48 push_guest_stack(lg, &gstack, eflags);
49 push_guest_stack(lg, &gstack, lg->regs->cs); 49 push_guest_stack(lg, &gstack, lg->regs->cs);