diff options
Diffstat (limited to 'drivers/lguest/interrupts_and_traps.c')
-rw-r--r-- | drivers/lguest/interrupts_and_traps.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/lguest/interrupts_and_traps.c b/drivers/lguest/interrupts_and_traps.c index 3d9830322646..bd0091bf79ec 100644 --- a/drivers/lguest/interrupts_and_traps.c +++ b/drivers/lguest/interrupts_and_traps.c | |||
@@ -231,6 +231,20 @@ static int direct_trap(const struct lguest *lg, | |||
231 | * go direct, of course 8) */ | 231 | * go direct, of course 8) */ |
232 | return idt_type(trap->a, trap->b) == 0xF; | 232 | return idt_type(trap->a, trap->b) == 0xF; |
233 | } | 233 | } |
234 | /*:*/ | ||
235 | |||
236 | /*M:005 The Guest has the ability to turn its interrupt gates into trap gates, | ||
237 | * if it is careful. The Host will let trap gates can go directly to the | ||
238 | * Guest, but the Guest needs the interrupts atomically disabled for an | ||
239 | * interrupt gate. It can do this by pointing the trap gate at instructions | ||
240 | * within noirq_start and noirq_end, where it can safely disable interrupts. */ | ||
241 | |||
242 | /*M:006 The Guests do not use the sysenter (fast system call) instruction, | ||
243 | * because it's hardcoded to enter privilege level 0 and so can't go direct. | ||
244 | * It's about twice as fast as the older "int 0x80" system call, so it might | ||
245 | * still be worthwhile to handle it in the Switcher and lcall down to the | ||
246 | * Guest. The sysenter semantics are hairy tho: search for that keyword in | ||
247 | * entry.S :*/ | ||
234 | 248 | ||
235 | /*H:260 When we make traps go directly into the Guest, we need to make sure | 249 | /*H:260 When we make traps go directly into the Guest, we need to make sure |
236 | * the kernel stack is valid (ie. mapped in the page tables). Otherwise, the | 250 | * the kernel stack is valid (ie. mapped in the page tables). Otherwise, the |