summaryrefslogtreecommitdiffstats
path: root/drivers/lguest/interrupts_and_traps.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2015-03-24 11:51:39 +1030
committerRusty Russell <rusty@rustcorp.com.au>2015-03-24 11:52:08 +1030
commit2f921b5bb0511fb698681d8ef35c48be7a9116bf (patch)
treee4f07e4d66f47c7af9142bf13e5851a77acec77f /drivers/lguest/interrupts_and_traps.c
parent7042cb4eb30967b5eb9eeba04907882f04d6b6e5 (diff)
downloadlinux-2f921b5bb0511fb698681d8ef35c48be7a9116bf.tar.gz
linux-2f921b5bb0511fb698681d8ef35c48be7a9116bf.tar.bz2
linux-2f921b5bb0511fb698681d8ef35c48be7a9116bf.zip
lguest: suppress interrupts for single insn, not range.
The last patch reduced our interrupt-suppression region to one address, so simplify the code somewhat. Also, remove the obsolete undefined instruction ranges and the comment which refers to lguest_guest.S instead of head_32.S. 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 70dfcdc29f1f..6d4c072b61e1 100644
--- a/drivers/lguest/interrupts_and_traps.c
+++ b/drivers/lguest/interrupts_and_traps.c
@@ -204,8 +204,7 @@ void try_deliver_interrupt(struct lg_cpu *cpu, unsigned int irq, bool more)
* They may be in the middle of an iret, where they asked us never to
* deliver interrupts.
*/
- if (cpu->regs->eip >= cpu->lg->noirq_start &&
- (cpu->regs->eip < cpu->lg->noirq_end))
+ if (cpu->regs->eip == cpu->lg->noirq_iret)
return;
/* If they're halted, interrupts restart them. */
@@ -395,8 +394,9 @@ static bool direct_trap(unsigned int num)
* The Guest has the ability to turn its interrupt gates into trap gates,
* if it is careful. The Host will let trap gates can go directly to the
* Guest, but the Guest needs the interrupts atomically disabled for an
- * interrupt gate. It can do this by pointing the trap gate at instructions
- * within noirq_start and noirq_end, where it can safely disable interrupts.
+ * interrupt gate. The Host could provide a mechanism to register more
+ * "no-interrupt" regions, and the Guest could point the trap gate at
+ * instructions within that region, where it can safely disable interrupts.
*/
/*M:006