At start of day a guest is supplied with a default GDT, which does not reside
within its own memory allocation. If the guest wishes to use other
than the default `flat' ring-1 and ring-3 segments that this GDT
provides, it must register a custom GDT and/or LDT with Xen, allocated
from its own memory.
The following hypercall is used to specify a new GDT:
int set_gdt(unsigned long *frame_list, int entries)
frame_list: An array of up to 14 machine page frames within
which the GDT resides. Any frame registered as a GDT frame may only
be mapped read-only within the guest's address space (e.g., no
writable mappings, no use as a page-table page, and so on). Only 14
pages may be specified because pages 15 and 16 are reserved for
the hypervisor's GDT entries.
entries: The number of descriptor-entry slots in the GDT.
The LDT is updated via the generic MMU update mechanism (i.e., via the