debuggers.hg
changeset 14629:cb7d02592b96
linux/x86-64: cleanup the Xen-specific macros in entry-xen.S
- SWITCH_TO_KERNEL is dead (and was broken)
- comments to HYPERVISOR_IRET were somewhat outdated
- updates of selecor RPLs shouldn't be done with byte size to avoid
store-to-load forwarding issues
Signed-off-by: Jan Beulich <jbeulich@novell.com>
- SWITCH_TO_KERNEL is dead (and was broken)
- comments to HYPERVISOR_IRET were somewhat outdated
- updates of selecor RPLs shouldn't be done with byte size to avoid
store-to-load forwarding issues
Signed-off-by: Jan Beulich <jbeulich@novell.com>
author | kfraser@localhost.localdomain |
---|---|
date | Tue Mar 27 17:23:33 2007 +0100 (2007-03-27) |
parents | c1bfe329f7ff |
children | ebb8ad702157 |
files | linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S |
line diff
1.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S Tue Mar 27 17:21:14 2007 +0100 1.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S Tue Mar 27 17:23:33 2007 +0100 1.3 @@ -148,11 +148,11 @@ NMI_MASK = 0x80000000 1.4 .endm 1.5 1.6 /* 1.7 - * Must be consistent with the definition in arch-x86_64.h: 1.8 + * Must be consistent with the definition in arch-x86/xen-x86_64.h: 1.9 * struct iret_context { 1.10 * u64 rax, r11, rcx, flags, rip, cs, rflags, rsp, ss; 1.11 * }; 1.12 - * #define VGCF_IN_SYSCALL (1<<8) 1.13 + * with rax, r11, and rcx being taken care of in the hypercall stub. 1.14 */ 1.15 .macro HYPERVISOR_IRET flag 1.16 testb $3,1*8(%rsp) 1.17 @@ -164,22 +164,16 @@ NMI_MASK = 0x80000000 1.18 jnz 1f 1.19 1.20 /* Direct iret to kernel space. Correct CS and SS. */ 1.21 - orb $3,1*8(%rsp) 1.22 - orb $3,4*8(%rsp) 1.23 + orl $3,1*8(%rsp) 1.24 + orl $3,4*8(%rsp) 1.25 1: iretq 1.26 1.27 2: /* Slow iret via hypervisor. */ 1.28 - andl $~NMI_MASK, 16(%rsp) 1.29 + andl $~NMI_MASK, 2*8(%rsp) 1.30 pushq $\flag 1.31 jmp hypercall_page + (__HYPERVISOR_iret * 32) 1.32 .endm 1.33 1.34 - .macro SWITCH_TO_KERNEL ssoff,adjust=0 1.35 - jc 1f 1.36 - orb $1,\ssoff-\adjust+4(%rsp) 1.37 -1: 1.38 - .endm 1.39 - 1.40 /* 1.41 * A newly forked process directly context switches into this. 1.42 */