debuggers.hg
changeset 3734:aa3214cefa34
bitkeeper revision 1.1159.212.111 (4207a372uscrEafJDzNOVuj8gyt_Fw)
SYSCALL fixes.
Signed-off-by: keir.fraser@cl.cam.ac.uk
SYSCALL fixes.
Signed-off-by: keir.fraser@cl.cam.ac.uk
author | kaf24@scramble.cl.cam.ac.uk |
---|---|
date | Mon Feb 07 17:20:50 2005 +0000 (2005-02-07) |
parents | ff48344d34df |
children | 0156bb4ae3d7 |
files | xen/arch/x86/boot/x86_64.S xen/arch/x86/x86_64/entry.S xen/arch/x86/x86_64/traps.c xen/include/asm-x86/config.h xen/include/public/arch-x86_64.h |
line diff
1.1 --- a/xen/arch/x86/boot/x86_64.S Mon Feb 07 16:00:00 2005 +0000 1.2 +++ b/xen/arch/x86/boot/x86_64.S Mon Feb 07 17:20:50 2005 +0000 1.3 @@ -193,8 +193,8 @@ ENTRY(gdt_table) 1.4 .quad 0x00af9a000000ffff /* 0x0810 ring 0 code, 64-bit mode */ 1.5 .quad 0x00cf92000000ffff /* 0x0818 ring 0 data */ 1.6 .quad 0x00cffa000000ffff /* 0x0823 ring 3 code, compatibility */ 1.7 - .quad 0x00affa000000ffff /* 0x082b ring 3 code, 64-bit mode */ 1.8 - .quad 0x00cff2000000ffff /* 0x0833 ring 3 data */ 1.9 + .quad 0x00cff2000000ffff /* 0x082b ring 3 data */ 1.10 + .quad 0x00affa000000ffff /* 0x0833 ring 3 code, 64-bit mode */ 1.11 .quad 0x0000000000000000 /* unused */ 1.12 .fill 4*NR_CPUS,8,0 /* space for TSS and LDT per CPU */ 1.13
2.1 --- a/xen/arch/x86/x86_64/entry.S Mon Feb 07 16:00:00 2005 +0000 2.2 +++ b/xen/arch/x86/x86_64/entry.S Mon Feb 07 17:20:50 2005 +0000 2.3 @@ -12,14 +12,15 @@ 2.4 #include <public/xen.h> 2.5 2.6 ENTRY(hypercall) 2.7 + sti 2.8 movl $__GUEST_SS,8(%rsp) 2.9 pushq %r11 2.10 pushq $__GUEST_CS 2.11 pushq %rcx 2.12 pushq $0 2.13 SAVE_ALL 2.14 - andq $(NR_hypercalls-1),%rax 2.15 - leaq SYMBOL_NAME(exception_table)(%rip),%rcx 2.16 + andq $(NR_hypercalls-1),%rax 2.17 + leaq SYMBOL_NAME(hypercall_table)(%rip),%rcx 2.18 callq *(%rcx,%rax,8) 2.19 RESTORE_ALL 2.20 addq $8,%rsp 2.21 @@ -42,7 +43,7 @@ error_code: 2.22 movl XREGS_entry_vector(%rsp),%eax 2.23 leaq SYMBOL_NAME(exception_table)(%rip),%rdx 2.24 callq *(%rdx,%rax,8) 2.25 - jmp restore_all_xen 2.26 + jmp restore_all_xen 2.27 2.28 ENTRY(divide_error) 2.29 pushq $0
3.1 --- a/xen/arch/x86/x86_64/traps.c Mon Feb 07 16:00:00 2005 +0000 3.2 +++ b/xen/arch/x86/x86_64/traps.c Mon Feb 07 17:20:50 2005 +0000 3.3 @@ -221,7 +221,7 @@ void __init percpu_traps_init(void) 3.4 * Common SYSCALL parameters. 3.5 */ 3.6 3.7 - wrmsr(MSR_STAR, 0, (FLAT_RING3_CS64<<16) | __HYPERVISOR_CS); 3.8 + wrmsr(MSR_STAR, 0, (FLAT_RING3_CS32<<16) | __HYPERVISOR_CS); 3.9 wrmsr(MSR_SYSCALL_MASK, ~EF_IE, 0U); /* disable interrupts */ 3.10 } 3.11
4.1 --- a/xen/include/asm-x86/config.h Mon Feb 07 16:00:00 2005 +0000 4.2 +++ b/xen/include/asm-x86/config.h Mon Feb 07 17:20:50 2005 +0000 4.3 @@ -191,9 +191,9 @@ extern void __out_of_line_bug(int line) 4.4 #define __HYPERVISOR_DS32 0x0818 4.5 #define __HYPERVISOR_DS __HYPERVISOR_DS64 4.6 4.7 -#define __GUEST_CS 0x082b 4.8 +#define __GUEST_CS 0x0833 4.9 #define __GUEST_DS 0x0000 4.10 -#define __GUEST_SS 0x0833 4.11 +#define __GUEST_SS 0x082b 4.12 4.13 /* For generic assembly code: use macros to define operation/operand sizes. */ 4.14 #define __OS "q" /* Operation Suffix */
5.1 --- a/xen/include/public/arch-x86_64.h Mon Feb 07 16:00:00 2005 +0000 5.2 +++ b/xen/include/public/arch-x86_64.h Mon Feb 07 17:20:50 2005 +0000 5.3 @@ -43,11 +43,11 @@ 5.4 */ 5.5 5.6 #define FLAT_RING3_CS32 0x0823 /* GDT index 260 */ 5.7 -#define FLAT_RING3_CS64 0x082b /* GDT index 261 */ 5.8 -#define FLAT_RING3_DS32 0x0833 /* GDT index 262 */ 5.9 +#define FLAT_RING3_CS64 0x0833 /* GDT index 261 */ 5.10 +#define FLAT_RING3_DS32 0x082b /* GDT index 262 */ 5.11 #define FLAT_RING3_DS64 0x0000 /* NULL selector */ 5.12 -#define FLAT_RING3_SS32 0x0833 /* GDT index 262 */ 5.13 -#define FLAT_RING3_SS64 0x0833 /* GDT index 262 */ 5.14 +#define FLAT_RING3_SS32 0x082b /* GDT index 262 */ 5.15 +#define FLAT_RING3_SS64 0x082b /* GDT index 262 */ 5.16 5.17 #define FLAT_GUESTOS_DS64 FLAT_RING3_DS64 5.18 #define FLAT_GUESTOS_DS32 FLAT_RING3_DS32