diff options
Diffstat (limited to 'drivers/lguest/core.c')
-rw-r--r-- | drivers/lguest/core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/lguest/core.c b/drivers/lguest/core.c index 0a46e8837d9a..4a315f08a567 100644 --- a/drivers/lguest/core.c +++ b/drivers/lguest/core.c | |||
@@ -453,6 +453,11 @@ static void run_guest_once(struct lguest *lg, struct lguest_pages *pages) | |||
453 | * lguest_pages". */ | 453 | * lguest_pages". */ |
454 | copy_in_guest_info(lg, pages); | 454 | copy_in_guest_info(lg, pages); |
455 | 455 | ||
456 | /* Set the trap number to 256 (impossible value). If we fault while | ||
457 | * switching to the Guest (bad segment registers or bug), this will | ||
458 | * cause us to abort the Guest. */ | ||
459 | lg->regs->trapnum = 256; | ||
460 | |||
456 | /* Now: we push the "eflags" register on the stack, then do an "lcall". | 461 | /* Now: we push the "eflags" register on the stack, then do an "lcall". |
457 | * This is how we change from using the kernel code segment to using | 462 | * This is how we change from using the kernel code segment to using |
458 | * the dedicated lguest code segment, as well as jumping into the | 463 | * the dedicated lguest code segment, as well as jumping into the |