aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/x86_64/traps.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-09-22 13:46:57 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-09-22 13:46:57 +0100
commita0c61c0f77d2e0926bf728623e474fe9126648ae (patch)
tree1ed061a7b59d162a5b33b11ea9dfc38e95fe28f3 /xen/arch/x86/x86_64/traps.c
parent27e019d758f4aa3cdbae469fb9c2fada5a021cfa (diff)
downloadxen-a0c61c0f77d2e0926bf728623e474fe9126648ae.tar.gz
xen-a0c61c0f77d2e0926bf728623e474fe9126648ae.tar.bz2
xen-a0c61c0f77d2e0926bf728623e474fe9126648ae.zip
x86: make GDT per-CPU
The major issue with supporting a significantly larger number of physical CPUs appears to be the use of per-CPU GDT entries - at present, x86-64 could support only up to 126 CPUs (with code changes to also use the top-most GDT page, that would be 254). Instead of trying to go with incremental steps here, by converting the GDT itself to be per-CPU, limitations in that respect go away entirely. Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/arch/x86/x86_64/traps.c')
-rw-r--r--xen/arch/x86/x86_64/traps.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/xen/arch/x86/x86_64/traps.c b/xen/arch/x86/x86_64/traps.c
index a4f83a1d63..34f4ecf59c 100644
--- a/xen/arch/x86/x86_64/traps.c
+++ b/xen/arch/x86/x86_64/traps.c
@@ -213,15 +213,14 @@ void show_page_walk(unsigned long addr)
asmlinkage void double_fault(void);
asmlinkage void do_double_fault(struct cpu_user_regs *regs)
{
- unsigned int cpu, tr;
-
- asm volatile ( "str %0" : "=r" (tr) );
- cpu = ((tr >> 3) - __FIRST_TSS_ENTRY) >> 2;
+ unsigned int cpu;
watchdog_disable();
console_force_unlock();
+ asm ( "lsll %1, %0" : "=r" (cpu) : "rm" (PER_CPU_GDT_ENTRY << 3) );
+
/* Find information saved during fault and dump it to the console. */
printk("*** DOUBLE FAULT ***\n");
print_xen_info();