Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3136589imu; Fri, 18 Jan 2019 05:30:36 -0800 (PST) X-Google-Smtp-Source: ALg8bN6XAKzwQuhwN1Xpt5VG9udkQG7Fhg/kacvivk2sq0uv7iWKANgSJI4i+SsViKJxT7Sr/0uv X-Received: by 2002:a62:b2c3:: with SMTP id z64mr19137473pfl.120.1547818236791; Fri, 18 Jan 2019 05:30:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547818236; cv=none; d=google.com; s=arc-20160816; b=rdo1wb1dd8yPkRbrPLDa68Sn+/XumvvLld7VLI3sw/i653CWJ/tPHSQ0fgCyWQ3Z+j RpY6CpfROJ+e9xZS0yOjhBKuPzCghgrbGRwOQCnuBUAt7o/4oMRPi/SDpRcoSOkPh0xB RtFfsMcfYeJ+2VQJB9mEhsrmnhuDbOxAmGcxzq2rD4AQyUiSe+n7SUev3zBtRCHoGesJ ryYINkS8oYjBt+3NjRlvbVohKZSxbY0ZoI8K5D6+Fm7+hO3XzWX/sDhRvK5OgnZ6Z0CY jPkscsSz/NyeZ1/rObTnOHG9kNqdFyMqsV+xcJeDqyENv6FmD3GccGpwnouxSlwEbef+ DmVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=nIrNcC5C0Uj/waF4jncItNQwtMHZnkEZGX4xbRXWs5A=; b=fQ0Tk5Y0J6HLLHUlhKq0z8tA7ZanKyTVXlPfweuGNwRBa3oeizfOj2BJXRbVdT2nOe V5/CFYqoWp6ubazCBShZhutgqD1f6JML8GQ0wXYHojmbtlU0kXkEg+PEiQGJf2uxQp7Q Y/v1fUiY4vp3d8ySVHYD7qvL/F2q4D9SsAbw+FK6iO9H4IN7X0vh7zynh5dFOdNzq1BQ GF7wCkx61Dw91v7PieYyHBWWqCEwE4qq8RD5WdT6zENd/nzpEeVsZ40zfP6dbUjisnex llz8SDklwDWDmE1Sfu+g+pNVnTPxnYdGJmx62lD5EJ8EBTB60O0rgz/SvIxKl0MP0s9l zW2g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l5si4646116pls.423.2019.01.18.05.30.19; Fri, 18 Jan 2019 05:30:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727429AbfARMRG (ORCPT + 99 others); Fri, 18 Jan 2019 07:17:06 -0500 Received: from dcvr.yhbt.net ([64.71.152.64]:58316 "EHLO dcvr.yhbt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727115AbfARMRG (ORCPT ); Fri, 18 Jan 2019 07:17:06 -0500 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 755331F453; Fri, 18 Jan 2019 12:17:05 +0000 (UTC) Date: Fri, 18 Jan 2019 12:17:05 +0000 From: Eric Wong To: Joonas Lahtinen , David Woodhouse , Joerg Roedel Cc: Daniel Vetter , David Airlie , Jani Nikula , Rodrigo Vivi , iommu@lists.linux-foundation.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] iommu/intel: quirk to disable DMAR for QM57 igfx Message-ID: <20190118121705.a4usvhnskyblooja@dcvr> References: <20181227114948.ev4b3jte3ubsc5us@dcvr> <154642214920.6261.102817444136744919@jlahtine-desk.ger.corp.intel.com> <20190104010626.e6yqdqkmdcqjepke@dcvr> <154659116310.4596.13613897418163029789@jlahtine-desk.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <154659116310.4596.13613897418163029789@jlahtine-desk.ger.corp.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Joonas Lahtinen wrote: > Quoting Eric Wong (2019-01-04 03:06:26) > > Yeah, so the Debian bpo 4.17(.17) kernel did not set > > CONFIG_INTEL_IOMMU_DEFAULT_ON, so I didn't encounter problems. > > My self-built kernels all set CONFIG_INTEL_IOMMU_DEFAULT_ON. > > So it's the case that IOMMU never worked on your machine. > > My recommendation would be to simply use intel_iommu=igfx_off if you > need IOMMU. > > Old hardware is known to have issues with IOMMU, and retroactively > enabling IOMMU on those machines just brings them up :/ How about we use a quirk in case distros make IOMMU the default one day? --------8<-------- Subject: [PATCH] iommu/intel: quirk to disable DMAR for QM57 igfx Like the GM45, it seems the integrated graphics on QM57 seems broken and hanging graphics with "intel_iommu=on". So allow future users to unconditionally enable DMAR support and not have to remember or know to specify "intel_iommu=igfx_off" cf. https://lore.kernel.org/lkml/20181227114948.ev4b3jte3ubsc5us@dcvr/ cf. https://lore.kernel.org/lkml/154659116310.4596.13613897418163029789@jlahtine-desk.ger.corp.intel.com/ Signed-off-by: Eric Wong --- drivers/iommu/intel-iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 048b5ab36a02..dc2507a01580 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -5399,7 +5399,7 @@ const struct iommu_ops intel_iommu_ops = { static void quirk_iommu_g4x_gfx(struct pci_dev *dev) { - /* G4x/GM45 integrated gfx dmar support is totally busted. */ + /* G4x/GM45/QM57 integrated gfx dmar support is totally busted. */ pr_info("Disabling IOMMU for graphics on this chipset\n"); dmar_map_gfx = 0; } @@ -5411,6 +5411,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e20, quirk_iommu_g4x_gfx); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e30, quirk_iommu_g4x_gfx); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e40, quirk_iommu_g4x_gfx); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e90, quirk_iommu_g4x_gfx); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0044, quirk_iommu_g4x_gfx); static void quirk_iommu_rwbf(struct pci_dev *dev) { @@ -5457,7 +5458,6 @@ static void quirk_calpella_no_shadow_gtt(struct pci_dev *dev) } } DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0040, quirk_calpella_no_shadow_gtt); -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0044, quirk_calpella_no_shadow_gtt); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0062, quirk_calpella_no_shadow_gtt); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x006a, quirk_calpella_no_shadow_gtt); -- EW