diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-07-12 05:22:00 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-16 05:08:27 -0400 |
commit | 6a52e4b1cddd90fbfde8fb67021657936ee74b07 (patch) | |
tree | c876e1fafe89169f373f6b04739242b5d646fcf7 /arch/x86/xen | |
parent | 71415c6a0877d5944d5dc3060f3b03513746158d (diff) |
x86_64: further cleanup of 32-bit compat syscall mechanisms
AMD only supports "syscall" from 32-bit compat usermode.
Intel and Centaur(?) only support "sysenter" from 32-bit compat usermode.
Set the X86 feature bits accordingly, and set up the vdso in
accordance with those bits. On the offchance we run on in a 64-bit
environment which supports neither syscall nor sysenter from 32-bit
mode, then fall back to the int $0x80 vdso.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/xen')
-rw-r--r-- | arch/x86/xen/setup.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index 3e11779755c3..e3648e64a637 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c | |||
@@ -83,12 +83,16 @@ static void xen_idle(void) | |||
83 | 83 | ||
84 | /* | 84 | /* |
85 | * Set the bit indicating "nosegneg" library variants should be used. | 85 | * Set the bit indicating "nosegneg" library variants should be used. |
86 | * We only need to bother in pure 32-bit mode; compat 32-bit processes | ||
87 | * can have un-truncated segments, so wrapping around is allowed. | ||
86 | */ | 88 | */ |
87 | static void __init fiddle_vdso(void) | 89 | static void __init fiddle_vdso(void) |
88 | { | 90 | { |
89 | #if defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION) | 91 | #ifdef CONFIG_X86_32 |
90 | extern const char vdso32_default_start; | 92 | u32 *mask; |
91 | u32 *mask = VDSO32_SYMBOL(&vdso32_default_start, NOTE_MASK); | 93 | mask = VDSO32_SYMBOL(&vdso32_int80_start, NOTE_MASK); |
94 | *mask |= 1 << VDSO_NOTE_NONEGSEG_BIT; | ||
95 | mask = VDSO32_SYMBOL(&vdso32_sysenter_start, NOTE_MASK); | ||
92 | *mask |= 1 << VDSO_NOTE_NONEGSEG_BIT; | 96 | *mask |= 1 << VDSO_NOTE_NONEGSEG_BIT; |
93 | #endif | 97 | #endif |
94 | } | 98 | } |