aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/lguest/interrupts_and_traps.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/lguest/interrupts_and_traps.c b/drivers/lguest/interrupts_and_traps.c
index 28433a155d67..70dfcdc29f1f 100644
--- a/drivers/lguest/interrupts_and_traps.c
+++ b/drivers/lguest/interrupts_and_traps.c
@@ -140,6 +140,16 @@ static void set_guest_interrupt(struct lg_cpu *cpu, u32 lo, u32 hi,
140 cpu->regs->eip = idt_address(lo, hi); 140 cpu->regs->eip = idt_address(lo, hi);
141 141
142 /* 142 /*
143 * Trapping always clears these flags:
144 * TF: Trap flag
145 * VM: Virtual 8086 mode
146 * RF: Resume
147 * NT: Nested task.
148 */
149 cpu->regs->eflags &=
150 ~(X86_EFLAGS_TF|X86_EFLAGS_VM|X86_EFLAGS_RF|X86_EFLAGS_NT);
151
152 /*
143 * There are two kinds of interrupt handlers: 0xE is an "interrupt 153 * There are two kinds of interrupt handlers: 0xE is an "interrupt
144 * gate" which expects interrupts to be disabled on entry. 154 * gate" which expects interrupts to be disabled on entry.
145 */ 155 */