From nobody Mon Feb 9 02:08:17 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1503415108635918.2396050190166; Tue, 22 Aug 2017 08:18:28 -0700 (PDT) Received: from localhost ([::1]:53185 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkAwl-00061a-8z for importer@patchew.org; Tue, 22 Aug 2017 11:18:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46709) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkAT1-0003GM-GY for qemu-devel@nongnu.org; Tue, 22 Aug 2017 10:47:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dkASx-0003Rl-J7 for qemu-devel@nongnu.org; Tue, 22 Aug 2017 10:47:43 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:34690) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dkASx-0003Qv-9o for qemu-devel@nongnu.org; Tue, 22 Aug 2017 10:47:39 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v7MEjfiu069335 for ; Tue, 22 Aug 2017 10:47:37 -0400 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0a-001b2d01.pphosted.com with ESMTP id 2cgjs02sw8-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 22 Aug 2017 10:47:36 -0400 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 22 Aug 2017 15:47:34 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 22 Aug 2017 15:47:31 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v7MElVFT22675558; Tue, 22 Aug 2017 14:47:31 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 020B54C044; Tue, 22 Aug 2017 15:44:33 +0100 (BST) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E567E4C040; Tue, 22 Aug 2017 15:44:32 +0100 (BST) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 22 Aug 2017 15:44:32 +0100 (BST) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 25651) id C677020F69C; Tue, 22 Aug 2017 16:47:30 +0200 (CEST) From: Christian Borntraeger To: Cornelia Huck Date: Tue, 22 Aug 2017 16:47:30 +0200 X-Mailer: git-send-email 2.7.4 X-TM-AS-GCONF: 00 x-cbid: 17082214-0020-0000-0000-000003B0742B X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17082214-0021-0000-0000-0000423FEEE1 Message-Id: <1503413250-18432-1-git-send-email-borntraeger@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-08-22_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1708220227 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PATCH/RFC] configure: enable --s390-pgste linker option X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , David Hildenbrand , qemu-devel , Christian Ehrhardt , Alexander Graf , Christian Borntraeger , Dan Horak Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 (>=3D 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 - the linker supports --s390-pgste (binutils >=3D 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 Cc: Alexander Graf Cc: Dan Horak Cc: David Hildenbrand Signed-off-by: Christian Borntraeger Acked-by: Janosch Frank --- configure | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/configure b/configure index dd73cce..4c9084b 100755 --- a/configure +++ b/configure @@ -6522,6 +6522,19 @@ if test "$target_linux_user" =3D "yes" -o "$target_b= sd_user" =3D "yes" ; then ldflags=3D"$ldflags $textseg_ldflags" fi =20 +# 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 +# - the linker support --s390-pgste +# - we build the system emulation (qemu-system-s390x) +# - KVM is enabled +if $ld --help 2>/dev/null | grep ".--s390-pgste" >/dev/null 2>/dev/null ; = then + if test "$target_softmmu" =3D "yes" -a "$ARCH" =3D "s390x" -a "$kvm" = =3D "yes" ; then + ldflags=3D"-Wl,--s390-pgste $ldflags" + fi +fi + echo "LDFLAGS+=3D$ldflags" >> $config_target_mak echo "QEMU_CFLAGS+=3D$cflags" >> $config_target_mak =20 --=20 2.7.4