x86_64: eliminate __GUEST_[CDS]S
PATCH 3/7 x86_64: eliminate __GUEST_[CDS]S
(in preparation for initial PAE-guest-on-64bit patches) x86_32 doesn't have these, and they're redundant with the respective FLAT_KERNEL_[CDS]S. Results in less changes needed when introducing the compatibility selectors.
Signed-off-by Jan Beulich <[email protected]>
xen/arch/x86/domain.c +2 -2
@@ -556,9 +556,9 @@ static void load_segments(struct vcpu *n regs->entry_vector = TRAP_syscall; regs->rflags &=0xFFFCBEFFUL ; - regs->ss = __GUEST_SS; + regs->ss =FLAT_KERNEL_SS ; regs->rsp = (unsigned long )(rsp-11 ); - regs->cs = __GUEST_CS; + regs->cs =FLAT_KERNEL_CS ; regs->rip = nctxt->failsafe_callback_eip; } }
xen/arch/x86/x86_64/traps.c +4 -4
@@ -260,9 +260,9 @@ void __init percpu_traps_init(void) stack[14 ] =0x41 ; stack[15 ] =0x53 ; -/* pushq $__GUEST_CS64 */ +/* pushq $FLAT_KERNEL_CS64 */ stack[16 ] =0x68 ; - *(u32 *)&stack[17 ] = __GUEST_CS64; + *(u32 *)&stack[17 ] =FLAT_KERNEL_CS64 ;/* jmp syscall_enter */ stack[21 ] =0xe9 ;
@@ -292,9 +292,9 @@ void __init percpu_traps_init(void) stack[14 ] =0x41 ; stack[15 ] =0x53 ; -/* pushq $__GUEST_CS32 */ +/* pushq $FLAT_KERNEL_CS32 */ stack[16 ] =0x68 ; - *(u32 *)&stack[17 ] = __GUEST_CS32; + *(u32 *)&stack[17 ] =FLAT_KERNEL_CS32 ;/* jmp syscall_enter */ stack[21 ] =0xe9 ;
xen/arch/x86/x86_64/entry.S +4 -4
@@ -45,7 +45,7 @@ restore_all_guest: addq $8,%rsp popq %rcx # RIP popq %r11 # CS - cmpw $__GUEST_CS32,%r11 + cmpw $FLAT_KERNEL_CS32,%r11 popq %r11 # RFLAGS popq %rsp # RSP je 1f
@@ -119,7 +119,7 @@ restore_all_xen: ALIGN ENTRY(syscall_enter) sti - movl $__GUEST_SS,24(%rsp) + movl $FLAT_KERNEL_SS,24(%rsp) pushq %rcx pushq $0 movl $TRAP_syscall,4(%rsp)
@@ -296,9 +296,9 @@ FLT13: movq %rax,(%rsi) /* IA32 Ref. Vol. 3: TF, VM, RF and NT flags are cleared on trap. */ movl $TRAP_syscall,UREGS_entry_vector+8(%rsp) andl $0xfffcbeff,UREGS_eflags+8(%rsp) - movq $__GUEST_SS,UREGS_ss+8(%rsp) + movq $FLAT_KERNEL_SS,UREGS_ss+8(%rsp) movq %rsi,UREGS_rsp+8(%rsp) - movq $__GUEST_CS,UREGS_cs+8(%rsp) + movq $FLAT_KERNEL_CS,UREGS_cs+8(%rsp) movq TRAPBOUNCE_eip(%rdx),%rax testq %rax,%rax jz domain_crash_synchronous
xen/include/asm-x86/config.h +0 -6
@@ -184,12 +184,6 @@ extern unsigned long _end; /* standard E#define __HYPERVISOR_DS32 0xe018#define __HYPERVISOR_DS __HYPERVISOR_DS64 -#define __GUEST_CS64 0xe033 -#define __GUEST_CS32 0xe023 -#define __GUEST_CS __GUEST_CS64 -#define __GUEST_DS 0x0000 -#define __GUEST_SS 0xe02b -/* For generic assembly code: use macros to define operation/operand sizes. */ #define __OS "q"/* Operation Suffix */ #define __OP "r"/* Operand Prefix */
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel