From patchwork Tue Mar 12 08:54:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 1055171 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=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.b="DGCOoYyu"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44JTRq0V6xz9s4V for ; Tue, 12 Mar 2019 19:59:19 +1100 (AEDT) Received: from localhost ([127.0.0.1]:47585 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3dFl-0004Id-0c for incoming@patchwork.ozlabs.org; Tue, 12 Mar 2019 04:59:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47283) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3dC5-0001Tg-G3 for qemu-devel@nongnu.org; Tue, 12 Mar 2019 04:55:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3dC4-0001Lw-36 for qemu-devel@nongnu.org; Tue, 12 Mar 2019 04:55:29 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:51651) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h3dC3-0001JM-29; Tue, 12 Mar 2019 04:55:28 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 44JTMH0rwyz9sBF; Tue, 12 Mar 2019 19:55:22 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1552380923; bh=si1aQ5pgP/FbMclpUMtl4VQPCJ9/g1i31hyN6EZAbwA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DGCOoYyuowzC9fmaZRL15xtX/y9mifxDfwxnB1J94BSLFNR2vFNlcW7jgZxEtLnPH ufJMkUy38DyxKeSDESCGdYOPzclgFqFVuxuE658H94GFzGS9FmHDScxXyTHsPuulbV wcZGrFxjGIysEu9Q94+7AGbLfftOTGsj3DqEssTY= From: David Gibson To: peter.maydell@linaro.org Date: Tue, 12 Mar 2019 19:54:02 +1100 Message-Id: <20190312085502.8203-3-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190312085502.8203-1-david@gibson.dropbear.id.au> References: <20190312085502.8203-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Subject: [Qemu-devel] [PULL 02/62] 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: lvivier@redhat.com, Alexey Kardashevskiy , qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.org, clg@kaod.org, David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Alexey Kardashevskiy 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 Message-Id: <20190227085149.38596-4-aik@ozlabs.ru> Signed-off-by: David Gibson --- 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 88437a79e6..57fe758e54 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 = 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 = { .argsz = sizeof(create) }; - long systempagesize = qemu_getrampagesize(); + long rampagesize = qemu_getrampagesize(); /* * 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 = systempagesize; + if (pagesize > rampagesize) { + pagesize = rampagesize; } pagesize = 1ULL << (63 - clz64(container->pgsizes & (pagesize | (pagesize - 1))));