aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/boot/x86_64.S
diff options
context:
space:
mode:
authorEmmanuel Ackaouy <ack@xensource.com>2007-01-05 17:32:00 +0000
committerEmmanuel Ackaouy <ack@xensource.com>2007-01-05 17:32:00 +0000
commit8f2348c03c7ac1a1f6baa91590eb0b5938bf727b (patch)
tree29365b97b287c3c0c3c6d4912264646e24bc34df /xen/arch/x86/boot/x86_64.S
parent1f2d77695e961365537c7ef9809c5f494991bc79 (diff)
downloadxen-8f2348c03c7ac1a1f6baa91590eb0b5938bf727b.tar.gz
xen-8f2348c03c7ac1a1f6baa91590eb0b5938bf727b.tar.bz2
xen-8f2348c03c7ac1a1f6baa91590eb0b5938bf727b.zip
Introduce _DOMF_compat and infrastructure as well as several conditionals
dealing with operations that need to distinguish between native and compatibility mode guests. Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/arch/x86/boot/x86_64.S')
-rw-r--r--xen/arch/x86/boot/x86_64.S27
1 files changed, 23 insertions, 4 deletions
diff --git a/xen/arch/x86/boot/x86_64.S b/xen/arch/x86/boot/x86_64.S
index 661f39a38a..fe07e36471 100644
--- a/xen/arch/x86/boot/x86_64.S
+++ b/xen/arch/x86/boot/x86_64.S
@@ -224,15 +224,34 @@ high_start:
.align PAGE_SIZE, 0
ENTRY(gdt_table)
.quad 0x0000000000000000 /* unused */
- .quad 0x00cf9a000000ffff /* 0xe008 ring 0 code, compatibility */
- .quad 0x00af9a000000ffff /* 0xe010 ring 0 code, 64-bit mode */
- .quad 0x00cf92000000ffff /* 0xe018 ring 0 data */
+ .quad 0x00af9a000000ffff /* 0xe008 ring 0 code, 64-bit mode */
+ .quad 0x00cf92000000ffff /* 0xe010 ring 0 data */
+ .quad 0x0000000000000000 /* reserved */
.quad 0x00cffa000000ffff /* 0xe023 ring 3 code, compatibility */
.quad 0x00cff2000000ffff /* 0xe02b ring 3 data */
.quad 0x00affa000000ffff /* 0xe033 ring 3 code, 64-bit mode */
- .quad 0x0000000000000000 /* unused */
+ .quad 0x00cf9a000000ffff /* 0xe038 ring 0 code, compatibility */
+ .org gdt_table - FIRST_RESERVED_GDT_BYTE + __TSS(0) * 8
.fill 4*NR_CPUS,8,0 /* space for TSS and LDT per CPU */
+#ifdef CONFIG_COMPAT
+ .align PAGE_SIZE, 0
+/* NB. Even rings != 0 get access to the full 4Gb, as only the */
+/* (compatibility) machine->physical mapping table lives there. */
+ENTRY(compat_gdt_table)
+ .quad 0x0000000000000000 /* unused */
+ .quad 0x00af9a000000ffff /* 0xe008 ring 0 code, 64-bit mode */
+ .quad 0x00cf92000000ffff /* 0xe010 ring 0 data */
+ .quad 0x00cfba000000ffff /* 0xe019 ring 1 code, compatibility */
+ .quad 0x00cfb2000000ffff /* 0xe021 ring 1 data */
+ .quad 0x00cffa000000ffff /* 0xe02b ring 3 code, compatibility */
+ .quad 0x00cff2000000ffff /* 0xe033 ring 3 data */
+ .quad 0x00cf9a000000ffff /* 0xe038 ring 0 code, compatibility */
+ .org compat_gdt_table - FIRST_RESERVED_GDT_BYTE + __TSS(0) * 8
+ .fill 4*NR_CPUS,8,0 /* space for TSS and LDT per CPU */
+# undef LIMIT
+#endif
+
/* Initial PML4 -- level-4 page table. */
.align PAGE_SIZE, 0
ENTRY(idle_pg_table)