[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 12/44] configure: enable --s390-pgste linker option
From: |
Cornelia Huck |
Subject: |
[Qemu-devel] [PULL 12/44] configure: enable --s390-pgste linker option |
Date: |
Wed, 30 Aug 2017 18:52:20 +0200 |
From: Christian Borntraeger <address@hidden>
KVM guests on s390 need a different page table layout than normal
processes (2kb page table + 2kb page status extensions vs 2kb page table
only). As of today this has to be enabled via the vm.allocate_pgste
sysctl.
Newer kernels (>= 4.12) on s390 check for an S390_PGSTE program header
and enable the pgste page table extensions in that case. This makes the
vm.allocate_pgste sysctl unnecessary. We enable this program header for
the s390 system emulation (qemu-system-s390x) if we build on s390
- for s390 system emulation
- the linker supports --s390-pgste (binutils >= 2.29)
- KVM is enabled
This will allow distributions to disable the global vm.allocate_pgste
sysctl, which will improve the page table allocation for non KVM
processes as only 2kb chunks are necessary.
Cc: Christian Ehrhardt <address@hidden>
Cc: Alexander Graf <address@hidden>
Cc: Dan Horak <address@hidden>
Cc: David Hildenbrand <address@hidden>
Signed-off-by: Christian Borntraeger <address@hidden>
Acked-by: Janosch Frank <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: David Hildenbrand <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>
---
configure | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index dd73cce62f..fb7e34a901 100755
--- a/configure
+++ b/configure
@@ -240,6 +240,11 @@ supported_target() {
return 1
}
+
+ld_has() {
+ $ld --help 2>/dev/null | grep ".$1" >/dev/null 2>&1
+}
+
# default parameters
source_path=$(dirname "$0")
cpu=""
@@ -5043,7 +5048,7 @@ fi
# Use ASLR, no-SEH and DEP if available
if test "$mingw32" = "yes" ; then
for flag in --dynamicbase --no-seh --nxcompat; do
- if $ld --help 2>/dev/null | grep ".$flag" >/dev/null 2>/dev/null ; then
+ if ld_has $flag ; then
LDFLAGS="-Wl,$flag $LDFLAGS"
fi
done
@@ -6522,6 +6527,20 @@ if test "$target_linux_user" = "yes" -o
"$target_bsd_user" = "yes" ; then
ldflags="$ldflags $textseg_ldflags"
fi
+# Newer kernels on s390 check for an S390_PGSTE program header and
+# enable the pgste page table extensions in that case. This makes
+# the vm.allocate_pgste sysctl unnecessary. We enable this program
+# header if
+# - we build on s390x
+# - we build the system emulation for s390x (qemu-system-s390x)
+# - KVM is enabled
+# - the linker supports --s390-pgste
+if test "$TARGET_ARCH" = "s390x" -a "$target_softmmu" = "yes" -a "$ARCH" =
"s390x" -a "$kvm" = "yes"; then
+ if ld_has --s390-pgste ; then
+ ldflags="-Wl,--s390-pgste $ldflags"
+ fi
+fi
+
echo "LDFLAGS+=$ldflags" >> $config_target_mak
echo "QEMU_CFLAGS+=$cflags" >> $config_target_mak
--
2.13.5
- [Qemu-devel] [PULL 02/44] s390x/css: generate solicited crw for rchp completion signaling, (continued)
- [Qemu-devel] [PULL 02/44] s390x/css: generate solicited crw for rchp completion signaling, Cornelia Huck, 2017/08/30
- [Qemu-devel] [PULL 03/44] s390x: introduce 2.11 compat machine, Cornelia Huck, 2017/08/30
- [Qemu-devel] [PULL 04/44] s390x/ipl: The s390-ipl device is not hot-pluggable, Cornelia Huck, 2017/08/30
- [Qemu-devel] [PULL 05/44] tests/boot-sector: Do not overwrite the x86 buffer on other architectures, Cornelia Huck, 2017/08/30
- [Qemu-devel] [PULL 06/44] tests/pxe: Check virtio-net-ccw on s390x, Cornelia Huck, 2017/08/30
- [Qemu-devel] [PULL 07/44] tests: Run filter-redirector and -mirror test only on POSIX systems, Cornelia Huck, 2017/08/30
- [Qemu-devel] [PULL 08/44] tests: Add network filter tests to the check-qtest-s390x list, Cornelia Huck, 2017/08/30
- [Qemu-devel] [PULL 10/44] watchdog/wdt_diag288: Mark diag288 watchdog as non-hotpluggable, Cornelia Huck, 2017/08/30
- [Qemu-devel] [PULL 09/44] s390x/tcg: specification exception for unknown diag, Cornelia Huck, 2017/08/30
- [Qemu-devel] [PULL 11/44] s390x: wire up diag288 in tcg, Cornelia Huck, 2017/08/30
- [Qemu-devel] [PULL 12/44] configure: enable --s390-pgste linker option,
Cornelia Huck <=
- [Qemu-devel] [PULL 13/44] 9pfs: fix dependencies, Cornelia Huck, 2017/08/30
- [Qemu-devel] [PULL 14/44] kvm: remove hard dependency on pci, Cornelia Huck, 2017/08/30
- [Qemu-devel] [PULL 15/44] s390x/pci: add stubs, Cornelia Huck, 2017/08/30
- [Qemu-devel] [PULL 16/44] s390x: chsc nt2 events are pci-only, Cornelia Huck, 2017/08/30
- [Qemu-devel] [PULL 17/44] s390x/pci: do not advertise pci on non-pci builds, Cornelia Huck, 2017/08/30
- [Qemu-devel] [PULL 18/44] s390x/ccw: create s390 phb conditionally, Cornelia Huck, 2017/08/30
- [Qemu-devel] [PULL 19/44] s390x/sclp: properly guard pci-specific functions, Cornelia Huck, 2017/08/30
- [Qemu-devel] [PULL 20/44] s390x/pci: fence off instructions for non-pci, Cornelia Huck, 2017/08/30
- [Qemu-devel] [PULL 21/44] s390x: refine pci dependencies, Cornelia Huck, 2017/08/30
- [Qemu-devel] [PULL 22/44] s390x/s390-skeys: Mark the storage key devices with user_creatable = false, Cornelia Huck, 2017/08/30