From patchwork Mon Jan 28 12:31:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Mammedov X-Patchwork-Id: 1031903 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43p8TD06V2z9s3q for ; Mon, 28 Jan 2019 23:44:16 +1100 (AEDT) Received: from localhost ([127.0.0.1]:59182 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1go6Gs-0006pL-28 for incoming@patchwork.ozlabs.org; Mon, 28 Jan 2019 07:44:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1go6GZ-0006nq-Cf for qemu-devel@nongnu.org; Mon, 28 Jan 2019 07:43:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1go6GX-0002rv-O1 for qemu-devel@nongnu.org; Mon, 28 Jan 2019 07:43:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58594) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1go6GV-0002qe-Ta; Mon, 28 Jan 2019 07:43:52 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D0A1C8E5AA; Mon, 28 Jan 2019 12:43: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 7D04E60BE0; Mon, 28 Jan 2019 12:43:45 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Mon, 28 Jan 2019 13:31:39 +0100 Message-Id: <1548678699-15717-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 28 Jan 2019 12:43:50 +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] [PATCH v2] 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, rth@twiddle.net Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 --- v2: * s/qemu_mempath_getpagesize/qemu_getrampagesiz/ and drop the rest of changes 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) static int kvm_s390_configure_mempath_backing(KVMState *s) { - size_t path_psize = qemu_mempath_getpagesize(mem_path); + size_t path_psize = qemu_getrampagesize(); if (path_psize == 4 * KiB) { return 0; @@ -319,7 +319,7 @@ int kvm_arch_init(MachineState *ms, KVMState *s) { MachineClass *mc = MACHINE_GET_CLASS(ms); - if (mem_path && kvm_s390_configure_mempath_backing(s)) { + if (kvm_s390_configure_mempath_backing(s)) { return -EINVAL; }