From nobody Sun Nov 9 17:53:30 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 1551257637109985.7311043103402; Wed, 27 Feb 2019 00:53:57 -0800 (PST) Received: from localhost ([127.0.0.1]:40372 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyuyJ-00057R-GP for importer@patchew.org; Wed, 27 Feb 2019 03:53:47 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36323) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyuwf-00044g-Ct for qemu-devel@nongnu.org; Wed, 27 Feb 2019 03:52:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gyuwe-0004CH-Ki for qemu-devel@nongnu.org; Wed, 27 Feb 2019 03:52:05 -0500 Received: from ozlabs.ru ([107.173.13.209]:35293) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyuwe-0004BB-Eh; Wed, 27 Feb 2019 03:52:04 -0500 Received: from fstn1-p1.ozlabs.ibm.com (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id 42415AE807E8; Wed, 27 Feb 2019 03:52:00 -0500 (EST) From: Alexey Kardashevskiy To: qemu-devel@nongnu.org Date: Wed, 27 Feb 2019 19:51:46 +1100 Message-Id: <20190227085149.38596-4-aik@ozlabs.ru> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190227085149.38596-1-aik@ozlabs.ru> References: <20190227085149.38596-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 v3 3/6] 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 , Alex Williamson , Sam Bobroff , Piotr Jaroszynski , qemu-ppc@nongnu.org, =?UTF-8?q?Leonardo=20Augusto=20Guimar=C3=A3es=20Garcia?= , 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 88437a7..57fe758 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 rampagesize =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 > rampagesize) { + pagesize =3D rampagesize; } pagesize =3D 1ULL << (63 - clz64(container->pgsizes & (pagesize | (pagesize - 1)))); --=20 2.17.1