xen-devel
[Xen-devel] [patch 09/33] xen: Add nosegneg capability to the vsyscall p
To: |
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Andi Kleen <ak@xxxxxxx> |
Subject: |
[Xen-devel] [patch 09/33] xen: Add nosegneg capability to the vsyscall page notes |
From: |
Jeremy Fitzhardinge <jeremy@xxxxxxxx> |
Date: |
Tue, 22 May 2007 15:09:50 +0100 |
Cc: |
Zachary Amsden <zach@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Pratt <ian.pratt@xxxxxxxxxxxxx>, lkml <linux-kernel@xxxxxxxxxxxxxxx>, Chris Wright <chrisw@xxxxxxxxxxxx>, virtualization@xxxxxxxxxxxxxx, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, Ulrich Drepper <drepper@xxxxxxxxxx>, Roland McGrath <roland@xxxxxxxxxx>, Christian Limpach <Christian.Limpach@xxxxxxxxxxxx> |
Delivery-date: |
Tue, 22 May 2007 07:52:23 -0700 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxx |
List-help: |
<mailto:xen-devel-request@lists.xensource.com?subject=help> |
List-id: |
Xen developer discussion <xen-devel.lists.xensource.com> |
List-post: |
<mailto:xen-devel@lists.xensource.com> |
List-subscribe: |
<http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe> |
List-unsubscribe: |
<http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe> |
References: |
<20070522140941.802382212@xxxxxxxx> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
User-agent: |
quilt/0.46-1 |
Add the "nosegneg" fake capabilty to the vsyscall page notes. This is
used by the runtime linker to select a glibc version which then
disables negative-offset accesses to the thread-local segment via
%gs. These accesses require emulation in Xen (because segments are
truncated to protect the hypervisor address space) and avoiding them
provides a measurable performance boost.
Signed-off-by: Ian Pratt <ian.pratt@xxxxxxxxxxxxx>
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>
Signed-off-by: Chris Wright <chrisw@xxxxxxxxxxxx>
Signed-off-by: Jeremy Fitzhardinge <jeremy@xxxxxxxxxxxxx>
Acked-by: Zachary Amsden <zach@xxxxxxxxxx>
Cc: Roland McGrath <roland@xxxxxxxxxx>
Cc: Ulrich Drepper <drepper@xxxxxxxxxx>
---
arch/i386/kernel/vsyscall-note.S | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
===================================================================
--- a/arch/i386/kernel/vsyscall-note.S
+++ b/arch/i386/kernel/vsyscall-note.S
@@ -12,3 +12,31 @@ ELFNOTE_START(Linux, 0, "a")
ELFNOTE_START(Linux, 0, "a")
.long LINUX_VERSION_CODE
ELFNOTE_END
+
+#ifdef CONFIG_XEN
+
+/*
+ * Add a special note telling glibc's dynamic linker a fake hardware
+ * flavor that it will use to choose the search path for libraries in the
+ * same way it uses real hardware capabilities like "mmx".
+ * We supply "nosegneg" as the fake capability, to indicate that we
+ * do not like negative offsets in instructions using segment overrides,
+ * since we implement those inefficiently. This makes it possible to
+ * install libraries optimized to avoid those access patterns in someplace
+ * like /lib/i686/tls/nosegneg. Note that an /etc/ld.so.conf.d/file
+ * corresponding to the bits here is needed to make ldconfig work right.
+ * It should contain:
+ * hwcap 1 nosegneg
+ * to match the mapping of bit to name that we give here.
+ */
+
+/* Bit used for the pseudo-hwcap for non-negative segments. We use
+ bit 1 to avoid bugs in some versions of glibc when bit 0 is
+ used; the choice is otherwise arbitrary. */
+#define VDSO_NOTE_NONEGSEG_BIT 1
+
+ELFNOTE_START(GNU, 2, "a")
+ .long 1, 1<<VDSO_NOTE_NONEGSEG_BIT /* ncaps, mask */
+ .byte VDSO_NOTE_NONEGSEG_BIT; .asciz "nosegneg" /* bit, name */
+ELFNOTE_END
+#endif
--
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [patch 00/33] xen: Xen paravirt_ops implementation, Jeremy Fitzhardinge
- [Xen-devel] [patch 02/33] xen: paravirt: add a hook for once the allocator is ready, Jeremy Fitzhardinge
- [Xen-devel] [patch 04/33] xen: paravirt: unstatic leave_mm, Jeremy Fitzhardinge
- [Xen-devel] [patch 01/33] xen: paravirt: add an "mm" argument to alloc_pt, Jeremy Fitzhardinge
- [Xen-devel] [patch 03/33] xen: paravirt: increase IRQ limit, Jeremy Fitzhardinge
- [Xen-devel] [patch 07/33] xen: paravirt: export __supported_pte_mask, Jeremy Fitzhardinge
- [Xen-devel] [patch 05/33] xen: paravirt: unstatic smp_store_cpu_info, Jeremy Fitzhardinge
- [Xen-devel] [patch 06/33] xen: paravirt: make siblingmap functions visible, Jeremy Fitzhardinge
- [Xen-devel] [patch 08/33] xen: Allocate and free vmalloc areas, Jeremy Fitzhardinge
- [Xen-devel] [patch 09/33] xen: Add nosegneg capability to the vsyscall page notes,
Jeremy Fitzhardinge <=
- [Xen-devel] [patch 17/33] xen: Complete pagetable pinning for Xen, Jeremy Fitzhardinge
- [Xen-devel] [patch 19/33] xen: Account for time stolen by Xen, Jeremy Fitzhardinge
- [Xen-devel] [patch 24/33] xen: xen: hack to prevent bad segment register reload, Jeremy Fitzhardinge
- [Xen-devel] [patch 12/33] xen: Xen virtual mmu, Jeremy Fitzhardinge
- [Xen-devel] [patch 13/33] xen: xen event channels, Jeremy Fitzhardinge
- [Xen-devel] [patch 15/33] xen: xen configuration, Jeremy Fitzhardinge
- [Xen-devel] [patch 18/33] xen: xen: ignore RW mapping of RO pages in pagetable_init, Jeremy Fitzhardinge
- [Xen-devel] [patch 20/33] xen: Implement xen_sched_clock, Jeremy Fitzhardinge
- [Xen-devel] [patch 14/33] xen: xen time implementation, Jeremy Fitzhardinge
- [Xen-devel] [patch 16/33] xen: xen: add pinned page flag, Jeremy Fitzhardinge
|
|
|