diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-01-28 01:51:23 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-01-28 02:36:24 +0100 |
commit | 28d83087776ebdad43a11fa3e687859462de4542 (patch) | |
tree | e86cecc7ac4dfd13c4eb1500078abe8283fbe7f7 /i386/i386/pcb.c | |
parent | 338d9ca7981f25099d99d280b0dd3af590d65763 (diff) |
Add initial code for disabling PV descriptors
* xen/configfrag.ac (--disable-pv-descriptors): Add option
* i386/xen/xen_boothdr.S (XEN_ELFNOTE_FEATURES) [!MACH_PV_DESCRIPTORS]: Add
writable_descriptor_tables.
* i386/i386/gdt.c: Turn appropriate MACH_XEN/MACH_HYP tests into
MACH_PV_DESCRIPTORS tests.
* i386/i386/gdt.h: Likewise.
* i386/i386/i386asm.sym: Likewise.
* i386/i386/idt.c: Likewise.
* i386/i386/idt_inittab.S: Likewise.
* i386/i386/ldt.c: Likewise.
* i386/i386/pcb.c: Likewise.
* i386/i386/seg.h: Likewise.
* i386/i386/user_ldt.c: Likewise.
* i386/i386/user_ldt.h: Likewise.
Diffstat (limited to 'i386/i386/pcb.c')
-rw-r--r-- | i386/i386/pcb.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/i386/i386/pcb.c b/i386/i386/pcb.c index 362d990..8d37d69 100644 --- a/i386/i386/pcb.c +++ b/i386/i386/pcb.c @@ -173,28 +173,28 @@ void switch_ktss(pcb) /* * Use system LDT. */ -#ifdef MACH_HYP +#ifdef MACH_PV_DESCRIPTORS hyp_set_ldt(&ldt, LDTSZ); -#else /* MACH_HYP */ +#else /* MACH_PV_DESCRIPTORS */ set_ldt(KERNEL_LDT); -#endif /* MACH_HYP */ +#endif /* MACH_PV_DESCRIPTORS */ } else { /* * Thread has its own LDT. */ -#ifdef MACH_HYP +#ifdef MACH_PV_DESCRIPTORS hyp_set_ldt(tldt->ldt, (tldt->desc.limit_low|(tldt->desc.limit_high<<16)) / sizeof(struct real_descriptor)); -#else /* MACH_HYP */ +#else /* MACH_PV_DESCRIPTORS */ *gdt_desc_p(mycpu,USER_LDT) = tldt->desc; set_ldt(USER_LDT); -#endif /* MACH_HYP */ +#endif /* MACH_PV_DESCRIPTORS */ } } -#ifdef MACH_XEN +#ifdef MACH_PV_DESCRIPTORS { int i; for (i=0; i < USER_GDT_SLOTS; i++) { @@ -206,14 +206,14 @@ void switch_ktss(pcb) } } } -#else /* MACH_XEN */ +#else /* MACH_PV_DESCRIPTORS */ /* Copy in the per-thread GDT slots. No reloading is necessary because just restoring the segment registers on the way back to user mode reloads the shadow registers from the in-memory GDT. */ memcpy (gdt_desc_p (mycpu, USER_GDT), pcb->ims.user_gdt, sizeof pcb->ims.user_gdt); -#endif /* MACH_XEN */ +#endif /* MACH_PV_DESCRIPTORS */ /* * Load the floating-point context, if necessary. |