From nobody Wed May 8 07:45:50 2024 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 1499176561947306.6234811001858; Tue, 4 Jul 2017 06:56:01 -0700 (PDT) Received: from localhost ([::1]:41564 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSOJ6-00042o-Tv for importer@patchew.org; Tue, 04 Jul 2017 09:56:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50718) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSOIF-0003Yt-Nx for qemu-devel@nongnu.org; Tue, 04 Jul 2017 09:55:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSOIE-00044c-MT for qemu-devel@nongnu.org; Tue, 04 Jul 2017 09:55:07 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:42973) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSOIE-00042z-8B; Tue, 04 Jul 2017 09:55:06 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 3x259L40m5z9t1Z; Tue, 4 Jul 2017 23:55:02 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1499176502; bh=+CpP5ctcW5Q9c+97KKCeK33Lu/x5WbJ9PyiIRA4uRK4=; h=From:To:Cc:Subject:Date:From; b=l/4bM7kk3jGibJETb7A38xQML7PpcccEmOtX4MeiHMFq/zrRf9w4HQRM5Jx4IdGky /ftvgTKUH6mLHnW+EvVMPSck+WPY4IZEJnRGe7WPXktCJ51lhP/2S3R2KsWCEmGE2d 0tRE4cmmBe+sCeraHDiOAGnpXQA29s/2ZQsTXwr8= From: David Gibson To: peter.maydell@linaro.org, agraf@suse.de, aik@olabs.ru, thuth@redhat.com Date: Tue, 4 Jul 2017 23:54:54 +1000 Message-Id: <20170704135454.13467-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.9.4 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] [PATCH] 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: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, 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