direct-io.hg

changeset 12382:3dfb2eef0f05

[XEN] x86-64: eliminate __GUEST_[CDS]S*

These duplicate the FLAT_KERNEL_* values also used for x86-32.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author kfraser@localhost.localdomain
date Mon Nov 13 13:39:16 2006 +0000 (2006-11-13)
parents c6efd6c2feaa
children 02899109a3ac
files xen/arch/x86/domain.c xen/arch/x86/x86_64/entry.S xen/arch/x86/x86_64/traps.c xen/include/asm-x86/config.h
line diff
     1.1 --- a/xen/arch/x86/domain.c	Mon Nov 13 13:37:54 2006 +0000
     1.2 +++ b/xen/arch/x86/domain.c	Mon Nov 13 13:39:16 2006 +0000
     1.3 @@ -587,9 +587,9 @@ static void load_segments(struct vcpu *n
     1.4          regs->entry_vector  = TRAP_syscall;
     1.5          regs->rflags       &= ~(X86_EFLAGS_AC|X86_EFLAGS_VM|X86_EFLAGS_RF|
     1.6                                  X86_EFLAGS_NT|X86_EFLAGS_TF);
     1.7 -        regs->ss            = __GUEST_SS;
     1.8 +        regs->ss            = FLAT_KERNEL_SS;
     1.9          regs->rsp           = (unsigned long)(rsp-11);
    1.10 -        regs->cs            = __GUEST_CS;
    1.11 +        regs->cs            = FLAT_KERNEL_CS;
    1.12          regs->rip           = nctxt->failsafe_callback_eip;
    1.13      }
    1.14  }
     2.1 --- a/xen/arch/x86/x86_64/entry.S	Mon Nov 13 13:37:54 2006 +0000
     2.2 +++ b/xen/arch/x86/x86_64/entry.S	Mon Nov 13 13:39:16 2006 +0000
     2.3 @@ -45,7 +45,7 @@ restore_all_guest:
     2.4          addq  $8,%rsp
     2.5          popq  %rcx                    # RIP
     2.6          popq  %r11                    # CS
     2.7 -        cmpw  $__GUEST_CS32,%r11
     2.8 +        cmpw  $FLAT_KERNEL_CS32,%r11
     2.9          popq  %r11                    # RFLAGS
    2.10          popq  %rsp                    # RSP
    2.11          je    1f
    2.12 @@ -119,7 +119,7 @@ restore_all_xen:
    2.13          ALIGN
    2.14  ENTRY(syscall_enter)
    2.15          sti
    2.16 -        movl  $__GUEST_SS,24(%rsp)
    2.17 +        movl  $FLAT_KERNEL_SS,24(%rsp)
    2.18          pushq %rcx
    2.19          pushq $0
    2.20          movl  $TRAP_syscall,4(%rsp)
    2.21 @@ -298,9 +298,9 @@ FLT13:  movq  %rax,(%rsi)               
    2.22          movl  $TRAP_syscall,UREGS_entry_vector+8(%rsp)
    2.23          andl  $~(X86_EFLAGS_AC|X86_EFLAGS_VM|X86_EFLAGS_RF|\
    2.24                   X86_EFLAGS_NT|X86_EFLAGS_TF),UREGS_eflags+8(%rsp)
    2.25 -        movq  $__GUEST_SS,UREGS_ss+8(%rsp)
    2.26 +        movq  $FLAT_KERNEL_SS,UREGS_ss+8(%rsp)
    2.27          movq  %rsi,UREGS_rsp+8(%rsp)
    2.28 -        movq  $__GUEST_CS,UREGS_cs+8(%rsp)
    2.29 +        movq  $FLAT_KERNEL_CS,UREGS_cs+8(%rsp)
    2.30          movq  TRAPBOUNCE_eip(%rdx),%rax
    2.31          testq %rax,%rax
    2.32          jz    domain_crash_synchronous
     3.1 --- a/xen/arch/x86/x86_64/traps.c	Mon Nov 13 13:37:54 2006 +0000
     3.2 +++ b/xen/arch/x86/x86_64/traps.c	Mon Nov 13 13:39:16 2006 +0000
     3.3 @@ -290,9 +290,9 @@ void __init percpu_traps_init(void)
     3.4      stack[14] = 0x41;
     3.5      stack[15] = 0x53;
     3.6  
     3.7 -    /* pushq $__GUEST_CS64 */
     3.8 +    /* pushq $FLAT_KERNEL_CS64 */
     3.9      stack[16] = 0x68;
    3.10 -    *(u32 *)&stack[17] = __GUEST_CS64;
    3.11 +    *(u32 *)&stack[17] = FLAT_KERNEL_CS64;
    3.12  
    3.13      /* jmp syscall_enter */
    3.14      stack[21] = 0xe9;
    3.15 @@ -322,9 +322,9 @@ void __init percpu_traps_init(void)
    3.16      stack[14] = 0x41;
    3.17      stack[15] = 0x53;
    3.18  
    3.19 -    /* pushq $__GUEST_CS32 */
    3.20 +    /* pushq $FLAT_KERNEL_CS32 */
    3.21      stack[16] = 0x68;
    3.22 -    *(u32 *)&stack[17] = __GUEST_CS32;
    3.23 +    *(u32 *)&stack[17] = FLAT_KERNEL_CS32;
    3.24  
    3.25      /* jmp syscall_enter */
    3.26      stack[21] = 0xe9;
     4.1 --- a/xen/include/asm-x86/config.h	Mon Nov 13 13:37:54 2006 +0000
     4.2 +++ b/xen/include/asm-x86/config.h	Mon Nov 13 13:39:16 2006 +0000
     4.3 @@ -194,12 +194,6 @@ extern unsigned long _end; /* standard E
     4.4  #define __HYPERVISOR_DS32 0xe018
     4.5  #define __HYPERVISOR_DS   __HYPERVISOR_DS64
     4.6  
     4.7 -#define __GUEST_CS64      0xe033
     4.8 -#define __GUEST_CS32      0xe023
     4.9 -#define __GUEST_CS        __GUEST_CS64
    4.10 -#define __GUEST_DS        0x0000
    4.11 -#define __GUEST_SS        0xe02b
    4.12 -
    4.13  /* For generic assembly code: use macros to define operation/operand sizes. */
    4.14  #define __OS          "q"  /* Operation Suffix */
    4.15  #define __OP          "r"  /* Operand Prefix */