From nobody Fri Nov 7 12:48:34 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.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 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1548691379463909.5436726215012; Mon, 28 Jan 2019 08:02:59 -0800 (PST) Received: from localhost ([127.0.0.1]:34189 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1go9NB-0007JF-Q5 for importer@patchew.org; Mon, 28 Jan 2019 11:02:57 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1go9HR-0002nr-S6 for qemu-devel@nongnu.org; Mon, 28 Jan 2019 10:57:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1go95f-0002Dt-7a for qemu-devel@nongnu.org; Mon, 28 Jan 2019 10:44:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54034) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1go95f-0002Dd-1y; Mon, 28 Jan 2019 10:44:51 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 440599FDFC; Mon, 28 Jan 2019 15:44:50 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id A3FDDC95B7; Mon, 28 Jan 2019 15:44:45 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Mon, 28 Jan 2019 16:32:38 +0100 Message-Id: <1548689558-23960-1-git-send-email-imammedo@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 28 Jan 2019 15:44:50 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3] s390x: remove direct reference to mem_path global form s390x code 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: david@redhat.com, cohuck@redhat.com, pasic@linux.ibm.com, borntraeger@de.ibm.com, qemu-s390x@nongnu.org, philmd@redhat.com, rth@twiddle.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" I plan to deprecate -mem-path option and replace it with memory-backend, for that it's necessary to get rid of mem_path global variable. Do it for s390x case, replacing it with alternative way to enable 1Mb hugepages capability. To do that, replace qemu_mempath_getpagesize() with qemu_getrampagesize() which also checks for -mem-path provided RAM. Signed-off-by: Igor Mammedov Reviewed-by: David Hildenbrand --- v3: fixup, typo in commit msg (Philippe Mathieu-Daud=C3=A9 ) v2: * s/qemu_mempath_getpagesize/qemu_getrampagesiz/ and drop the rest of cha= nges David Hildenbrand --- target/s390x/kvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c index 2ebf26a..90766fa 100644 --- a/target/s390x/kvm.c +++ b/target/s390x/kvm.c @@ -287,7 +287,7 @@ void kvm_s390_crypto_reset(void) =20 static int kvm_s390_configure_mempath_backing(KVMState *s) { - size_t path_psize =3D qemu_mempath_getpagesize(mem_path); + size_t path_psize =3D qemu_getrampagesize(); =20 if (path_psize =3D=3D 4 * KiB) { return 0; @@ -319,7 +319,7 @@ int kvm_arch_init(MachineState *ms, KVMState *s) { MachineClass *mc =3D MACHINE_GET_CLASS(ms); =20 - if (mem_path && kvm_s390_configure_mempath_backing(s)) { + if (kvm_s390_configure_mempath_backing(s)) { return -EINVAL; } =20 --=20 2.7.4