ia64/xen-unstable

changeset 1086:c89c254c2bdb

bitkeeper revision 1.719.1.1 (402b88dbPFLq-2M3bwI8UKm_GsCkQw)

process.c, Rules.mk:
Fix bug when context-switching LDT in Xenolinux.
author kaf24@scramble.cl.cam.ac.uk
date Thu Feb 12 14:08:27 2004 +0000 (2004-02-12)
parents 35e9a7d31995
children 0960e7d04fce
files xen/arch/i386/Rules.mk xenolinux-2.4.24-sparse/arch/xeno/kernel/process.c
line diff
     1.1 --- a/xen/arch/i386/Rules.mk	Thu Feb 12 11:51:34 2004 +0000
     1.2 +++ b/xen/arch/i386/Rules.mk	Thu Feb 12 14:08:27 2004 +0000
     1.3 @@ -9,8 +9,8 @@ MONITOR_BASE := 0xFC500000
     1.4  LOAD_BASE    := 0x00100000
     1.5  CFLAGS  := -nostdinc -fno-builtin -fno-common -fno-strict-aliasing 
     1.6  CFLAGS  += -iwithprefix include -O3 -Wall -DMONITOR_BASE=$(MONITOR_BASE)
     1.7 -#CFLAGS  += -fomit-frame-pointer -I$(BASEDIR)/include -D__KERNEL__ -DNDEBUG
     1.8 -CFLAGS  += -fomit-frame-pointer -I$(BASEDIR)/include -D__KERNEL__
     1.9 +CFLAGS  += -fomit-frame-pointer -I$(BASEDIR)/include -D__KERNEL__ -DNDEBUG
    1.10 +#CFLAGS  += -fomit-frame-pointer -I$(BASEDIR)/include -D__KERNEL__
    1.11  CFLAGS  += -Wno-pointer-arith -Wredundant-decls
    1.12  LDFLAGS := -T xeno.lds -N
    1.13  
     2.1 --- a/xenolinux-2.4.24-sparse/arch/xeno/kernel/process.c	Thu Feb 12 11:51:34 2004 +0000
     2.2 +++ b/xenolinux-2.4.24-sparse/arch/xeno/kernel/process.c	Thu Feb 12 14:08:27 2004 +0000
     2.3 @@ -371,6 +371,15 @@ void __switch_to(struct task_struct *pre
     2.4  
     2.5      __cli();
     2.6  
     2.7 +    /*
     2.8 +     * We clobber FS and GS here so that we avoid a GPF when restoring previous
     2.9 +     * task's FS/GS values in Xen when the LDT is switched. If we don't do this
    2.10 +     * then we can end up erroneously re-flushing the page-update queue when
    2.11 +     * we 'execute_multicall_list'.
    2.12 +     */
    2.13 +    __asm__ __volatile__ ( 
    2.14 +        "xorl %%eax,%%eax; movl %%eax,%%fs; movl %%eax,%%gs" : : : "eax" );
    2.15 +
    2.16      MULTICALL_flush_page_update_queue();
    2.17  
    2.18      /*