From patchwork Tue Sep 13 17:50:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1677400 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MRrbb6Mk9z1ypR for ; Wed, 14 Sep 2022 03:50:34 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1oYA3G-0000Vx-TN; Tue, 13 Sep 2022 17:50:26 +0000 Received: from mail-pj1-f47.google.com ([209.85.216.47]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1oYA3E-0000VP-Si for kernel-team@lists.ubuntu.com; Tue, 13 Sep 2022 17:50:25 +0000 Received: by mail-pj1-f47.google.com with SMTP id q3so12070068pjg.3 for ; Tue, 13 Sep 2022 10:50:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date; bh=mIELx4n7+tgvC8iukSQhxfzkabjYne5vVzGhtMhrnTI=; b=zbUNoT127jGTCxo8qYCwSdsxNMEe8olrSMnJoNAJ3cZRNPa94hD9sqUBo4IHl1r+E2 2BMeulg4IuOZqdWlBjP6W3mQ0KVDGZM78Uyp4U3nWTsLnVe//Sbp5+gJNeUMEHR2NoxC 41W+FJuLuo/+j0fyoxH3ijZuAv9xive01SjyNM8wmW/aDlYrWm4fCEamPqLPrwbctbDE xyzdnA1TrZbBOOeVGmqHUfPNIYk5XkIvxeHJNaNch3m/Mn+mYWEEDWEyFijQu+/m1Buc MWg8571Z30vpSR6pNlUvp9bXjZchOhzGeMbOTtQ8MkWsGwYAfAVQkfB/UpsGjVqE3toQ /Ucg== X-Gm-Message-State: ACgBeo0r2CctE8aeMh+lBtAPbiKtDWvpPQ0g1Scl3pP1gRoRkfCiiCFO F4D8zFbDx3klEw/Q95ZZ5c3AlkeXbM8= X-Google-Smtp-Source: AA6agR6jMUXdUmQIWbhk8csUh/pbbR9p3ozodpjzEOgq13iAeQMjKnlKFR454Xy4XU8ZCPr8gtohSA== X-Received: by 2002:a17:902:e547:b0:178:2aee:ab1d with SMTP id n7-20020a170902e54700b001782aeeab1dmr11989379plf.29.1663091422914; Tue, 13 Sep 2022 10:50:22 -0700 (PDT) Received: from yewun.. (61-227-100-91.dynamic-ip.hinet.net. [61.227.100.91]) by smtp.gmail.com with ESMTPSA id z11-20020a170902cccb00b00173cfaed233sm8725768ple.62.2022.09.13.10.50.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Sep 2022 10:50:22 -0700 (PDT) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1][SRU][OEM-6.0/Unstable] UBUNTU: SAUCE: iommu: intel-ipu: use IOMMU passthrough mode for Intel IPUs on Raptor Lake Date: Wed, 14 Sep 2022 01:50:19 +0800 Message-Id: <20220913175019.1483658-2-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220913175019.1483658-1-vicamo.yang@canonical.com> References: <20220913175019.1483658-1-vicamo.yang@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.216.47; envelope-from=vicamo@gmail.com; helo=mail-pj1-f47.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: zouxiaoh BugLink: https://bugs.launchpad.net/bugs/1989041 Intel IPU(Image Processing Unit) has its own (IO)MMU hardware, The IPU driver allocates its own page table that is not mapped via the DMA, and thus the Intel IOMMU driver blocks access giving this error: DMAR: DRHD: handling fault status reg 3 DMAR: [DMA Read] Request device [00:05.0] PASID ffffffff fault addr 76406000 [fault reason 06] PTE Read access is not set As IPU is not an external facing device which is not risky, so use IOMMU passthrough mode for Intel IPUs. (backported from https://github.com/intel/ipu6-drivers/blob/89c6b99e4bec00a04b53f37cd8c3c01ce824a4ab/patch/IOMMU-passthrough-for-intel-ipu.diff) Signed-off-by: You-Sheng Yang --- drivers/iommu/intel/iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index 5894a2ad638f..b602fd5084cd 100644 --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@ -38,7 +38,8 @@ #define IS_USB_DEVICE(pdev) ((pdev->class >> 8) == PCI_CLASS_SERIAL_USB) #define IS_ISA_DEVICE(pdev) ((pdev->class >> 8) == PCI_CLASS_BRIDGE_ISA) #define IS_INTEL_IPU(pdev) ((pdev)->vendor == PCI_VENDOR_ID_INTEL && \ - ((pdev)->device == 0x9a19 || \ + ((pdev)->device == 0xa75d || \ + (pdev)->device == 0x9a19 || \ (pdev)->device == 0x9a39 || \ (pdev)->device == 0x4e19 || \ (pdev)->device == 0x465d || \