From nobody Mon Feb 9 01:30:53 2026 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 (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549385246652765.4371179150537; Tue, 5 Feb 2019 08:47:26 -0800 (PST) Received: from localhost ([127.0.0.1]:34721 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gr3sW-0005Mp-KJ for importer@patchew.org; Tue, 05 Feb 2019 11:47:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54592) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gr3mk-00012t-Ln for qemu-devel@nongnu.org; Tue, 05 Feb 2019 11:41:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gr3mj-0007vp-Rv for qemu-devel@nongnu.org; Tue, 05 Feb 2019 11:41:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52956) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gr3mj-0007vJ-MR; Tue, 05 Feb 2019 11:41:21 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D148A8830E; Tue, 5 Feb 2019 16:41:20 +0000 (UTC) Received: from localhost (dhcp-192-187.str.redhat.com [10.33.192.187]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6E4EB1048116; Tue, 5 Feb 2019 16:41:20 +0000 (UTC) From: Cornelia Huck To: Peter Maydell Date: Tue, 5 Feb 2019 17:41:01 +0100 Message-Id: <20190205164109.25413-3-cohuck@redhat.com> In-Reply-To: <20190205164109.25413-1-cohuck@redhat.com> References: <20190205164109.25413-1-cohuck@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 05 Feb 2019 16:41:21 +0000 (UTC) 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] [PULL 02/10] s390x: remove direct reference to mem_path global from 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: Igor Mammedov , qemu-s390x@nongnu.org, Cornelia Huck , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Igor Mammedov 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. Todo 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 Message-Id: <1548834906-133241-1-git-send-email-imammedo@redhat.com> Signed-off-by: Cornelia Huck --- target/s390x/kvm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c index 2ebf26adfe..8613e19d11 100644 --- a/target/s390x/kvm.c +++ b/target/s390x/kvm.c @@ -42,6 +42,7 @@ #include "hw/hw.h" #include "sysemu/device_tree.h" #include "exec/gdbstub.h" +#include "exec/ram_addr.h" #include "trace.h" #include "hw/s390x/s390-pci-inst.h" #include "hw/s390x/s390-pci-bus.h" @@ -287,7 +288,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 +320,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.17.2