From nobody Wed Nov 5 09:24:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1499748403283995.4733870229286; Mon, 10 Jul 2017 21:46:43 -0700 (PDT) Received: from localhost ([::1]:44146 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUn4L-0000Wi-Ri for importer@patchew.org; Tue, 11 Jul 2017 00:46:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40677) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUmxP-0002Ml-TM for qemu-devel@nongnu.org; Tue, 11 Jul 2017 00:39:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUmxP-0007Vd-00 for qemu-devel@nongnu.org; Tue, 11 Jul 2017 00:39:31 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:43421) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dUmxO-0007UE-JJ; Tue, 11 Jul 2017 00:39:30 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 3x68Vy4xX7z9t2J; Tue, 11 Jul 2017 14:39:22 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1499747962; bh=Uxt1BvHlsCQHaGn7XUIPeSYAR+/0a4nFBEb9jMQKnYY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dzDCOl0oOxNfC/1wQEvGqe7bjgeKlmg7x8xNmXu24qz8ynmN50PkNpJazggA6UH4+ gONbiw0Aqp0JxB617Xh7lvZx4Wy1ykthn6Pad7bzY0CZWNFAI4G2VzDha5SY3KCwvY BoUPWhqH9bBH8bIV7mmAuYWQURuSHY3mXiwgFyGo= From: David Gibson To: peter.maydell@linaro.org Date: Tue, 11 Jul 2017 14:39:14 +1000 Message-Id: <20170711043917.1757-15-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170711043917.1757-1-david@gibson.dropbear.id.au> References: <20170711043917.1757-1-david@gibson.dropbear.id.au> 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 14/17] spapr: Only report host/guest IOMMU page size mismatches on KVM 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, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, surajjs@au1.ibm.com, aik@ozlabs.ru, sbobroff@au1.ibm.com, groug@kaod.org, agraf@suse.de, qemu-ppc@nongnu.org, bharata@linux.vnet.ibm.com, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" We print a warning if the spapr IOMMU isn't configured to support a page size matching the host page size backing RAM. When that's the case we need more complex logic to translate VFIO mappings, which is slower. But, it's not so slow that it would be at all noticeable against the general slowness of TCG. So, only warn when using KVM. This removes some noisy and unhelpful warnings from make check on hosts with page sizes which typically differ from those on POWER (e.g. Sparc). Reported-by: Peter Maydell Signed-off-by: David Gibson Reviewed-by: Thomas Huth --- hw/ppc/spapr_pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index cc1588d..a52dcf8 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -1745,7 +1745,8 @@ static void spapr_phb_realize(DeviceState *dev, Error= **errp) } =20 /* DMA setup */ - if ((sphb->page_size_mask & qemu_getrampagesize()) =3D=3D 0) { + if (((sphb->page_size_mask & qemu_getrampagesize()) =3D=3D 0) + && kvm_enabled()) { error_report("System page size 0x%lx is not enabled in page_size_m= ask " "(0x%"PRIx64"). Performance may be slow", qemu_getrampagesize(), sphb->page_size_mask); --=20 2.9.4