From nobody Sat Nov 8 10:14:59 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1550122068448835.7197502490087; Wed, 13 Feb 2019 21:27:48 -0800 (PST) Received: from localhost ([127.0.0.1]:40470 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gu9Yn-0002Xs-H7 for importer@patchew.org; Thu, 14 Feb 2019 00:27:45 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55502) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gu9Tg-0007dY-DT for qemu-devel@nongnu.org; Thu, 14 Feb 2019 00:22:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gu9Tf-00065g-JI for qemu-devel@nongnu.org; Thu, 14 Feb 2019 00:22:28 -0500 Received: from ozlabs.ru ([107.173.13.209]:58760) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gu9Tf-00065C-7e; Thu, 14 Feb 2019 00:22:27 -0500 Received: from fstn1-p1.ozlabs.ibm.com (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id BBE1CAE80120; Thu, 14 Feb 2019 00:21:52 -0500 (EST) From: Alexey Kardashevskiy To: qemu-devel@nongnu.org Date: Thu, 14 Feb 2019 16:21:42 +1100 Message-Id: <20190214052144.59541-3-aik@ozlabs.ru> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190214052144.59541-1-aik@ozlabs.ru> References: <20190214052144.59541-1-aik@ozlabs.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 107.173.13.209 Subject: [Qemu-devel] [PATCH qemu v2 2/4] vfio/spapr: Rename local systempagesize variable 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: Jose Ricardo Ziviani , Alexey Kardashevskiy , Daniel Henrique Barboza , Piotr Jaroszynski , Alex Williamson , qemu-ppc@nongnu.org, Reza Arbab , David Gibson 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" The "systempagesize" name suggests that it is the host system page size while it is the smallest page size of memory backing the guest RAM so let's rename it to stop confusion. This should cause no behavioral change. Signed-off-by: Alexey Kardashevskiy --- hw/vfio/spapr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/vfio/spapr.c b/hw/vfio/spapr.c index 302d6b0..1498fee 100644 --- a/hw/vfio/spapr.c +++ b/hw/vfio/spapr.c @@ -148,14 +148,14 @@ int vfio_spapr_create_window(VFIOContainer *container, uint64_t pagesize =3D memory_region_iommu_get_min_page_size(iommu_mr); unsigned entries, bits_total, bits_per_level, max_levels; struct vfio_iommu_spapr_tce_create create =3D { .argsz =3D sizeof(crea= te) }; - long systempagesize =3D qemu_getrampagesize(); + long minpagesize =3D qemu_getrampagesize(); =20 /* * The host might not support the guest supported IOMMU page size, * so we will use smaller physical IOMMU pages to back them. */ - if (pagesize > systempagesize) { - pagesize =3D systempagesize; + if (pagesize > minpagesize) { + pagesize =3D minpagesize; } pagesize =3D 1ULL << (63 - clz64(container->pgsizes & (pagesize | (pagesize - 1)))); --=20 2.17.1