From patchwork Mon Dec 5 21:58:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 9461641 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5979560231 for ; Mon, 5 Dec 2016 21:58:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4E188281AA for ; Mon, 5 Dec 2016 21:58:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 41660281D2; Mon, 5 Dec 2016 21:58:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CE1E2281AA for ; Mon, 5 Dec 2016 21:58:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 578D06E1BB; Mon, 5 Dec 2016 21:58:44 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pg0-x22f.google.com (mail-pg0-x22f.google.com [IPv6:2607:f8b0:400e:c05::22f]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3B6186E305 for ; Mon, 5 Dec 2016 21:58:43 +0000 (UTC) Received: by mail-pg0-x22f.google.com with SMTP id p66so140984952pga.2 for ; Mon, 05 Dec 2016 13:58:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=X1ANmKkxsJGnq/uJWDSHrgeYTNzeVBKSxXbMu0Rm4SA=; b=gvrUQM696NqTKRHRS6klSKUDdp59lx7TekIXWfeRp1AJDO7Rd7rR/YbkDRGs7+T4ni XU9xwS/Oh/5fYXr5SmrCOqAZuyh6TiJHlU6XaqwKfC/W9FRTX8UuVoGiPCE404OfEpwv 9vU1HfwuwfvsDu6liIJvG+qcocjAVqNvhRPM8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=X1ANmKkxsJGnq/uJWDSHrgeYTNzeVBKSxXbMu0Rm4SA=; b=J9V3XGjyQZasXZoGgMJQq8n3KtJbJ9fy4QxowJeYBs827tLraIYqr4amGJoLWDeEHg FEKsgnFZTx14p0L2wQskYhl62Fv1SyGmBY9CQs/ZTwt6w5t5O98gO/VXTYF1U2+VUp7Q /qf7f0Bit7AuXmAatKy6mV1aEdHjpl11R/82kjEgrtoHgX/AjAGJkkXDwuwJeHgsELpy fAihL2gEWz2I62vJt13asWzN1MCeH6w11+stlY4SB1RXJIYzhrmm2HwIp++g1C+fEx34 7agXLpU7OhRbf7oV5x+loHuQUQCDsclMa259rgXbe8P8Sv3cS7SHOB8vp6SSbW4+Io+c Fs5w== X-Gm-Message-State: AKaTC02uIq4iil+eY6OcgyjMs6sbypu4nEuhoCyGCKH+OLTEaaOxQ+icGq2IszrFPrcS2fAN X-Received: by 10.84.131.165 with SMTP id d34mr84535920pld.41.1480975122587; Mon, 05 Dec 2016 13:58:42 -0800 (PST) Received: from www.outflux.net (173-164-112-133-Oregon.hfc.comcastbusiness.net. [173.164.112.133]) by smtp.gmail.com with ESMTPSA id m5sm29660304pgn.42.2016.12.05.13.58.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Dec 2016 13:58:42 -0800 (PST) Date: Mon, 5 Dec 2016 13:58:41 -0800 From: Kees Cook To: Daniel Vetter Message-ID: <20161205215841.GA20819@beast> MIME-Version: 1.0 Content-Disposition: inline Cc: intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, David Woodhouse , Joerg Roedel Subject: [Intel-gfx] [PATCH] iommu/intel: disable DMAR for Q35 integrated gfx X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP This blacklists the Q35 integrated graphics so IOMMU can be otherwise enabled. Without this, a Q35 system can only enable IOMMU when booting with "intel_iommu=on,igfx_off" but not "intel_iommu=on". 00:02.0 0300: 8086:29b2 (rev 02) (prog-if 00 [VGA controller]) Subsystem: 8086:4f4a Flags: bus master, fast devsel, latency 0, IRQ 32 Memory at e0380000 (32-bit, non-prefetchable) [size=512K] I/O ports at 2460 [size=8] Memory at d0000000 (32-bit, prefetchable) [size=256M] Memory at e0200000 (32-bit, non-prefetchable) [size=1M] Expansion ROM at [disabled] Capabilities: Kernel driver in use: i915 Kernel modules: i915 Signed-off-by: Kees Cook --- drivers/iommu/intel-iommu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index d8376c2d18b3..24e5b06834ae 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -5327,6 +5327,7 @@ static void quirk_iommu_g4x_gfx(struct pci_dev *dev) dmar_map_gfx = 0; } +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x29b2, quirk_iommu_g4x_gfx); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2a40, quirk_iommu_g4x_gfx); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e00, quirk_iommu_g4x_gfx); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e10, quirk_iommu_g4x_gfx);