From patchwork Wed Sep 30 08:05:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 1374190 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=Y6sHwjNa; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=default header.b=1tq323Rf; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C1TN14WqHz9sSC for ; Wed, 30 Sep 2020 18:05:53 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:To:From:Date: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=iMHA2igsxPnnpGHv7/Eeb+DvGxzEcxDufOTxxo46DTw=; b=Y6sHwjNaaq0QHJUb9VR1Rvq8f4 zOA9FwkaAGyFabN1gx2ckIR13Jm1TvcBFwCuVN506euFZwTgzzayDkwaggamXYuw0sSFKH09nfJ1v mfCNPGUfeq0kW4mPjjMCt96M1yz6IwEPlE6ugmmu5xPMb6yJKwfMfdlKMDCQ31TJOzKaWUSaopElP XEVYf8LReV0EbgDwrCROa2+jQjn8BXXqg3aczy6hdWVoakv0iY9JW8lMzhaF8vHMVSwEKeusbeqNJ CxUJGF6xJ7f9d3UDzEimUZ9m8fD5mVRFrceMlc2oBU7LC6buXHVr1iUEv1OCdZMPBVI25LtAFercN TkHz9Plw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNX7D-0007rr-O2; Wed, 30 Sep 2020 08:05:31 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNX7B-0007qp-5e for linux-arm-kernel@lists.infradead.org; Wed, 30 Sep 2020 08:05:30 +0000 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 615432072E; Wed, 30 Sep 2020 08:05:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601453128; bh=7JYxs9JSU+BxuljUNkjSTE7tyNPi9bfc9U9063UfASs=; h=Date:From:To:Cc:Subject:From; b=1tq323Rfi4bfF5jkhFvFM3www8VuwlCCwtOEL6rGlNhu9BVfipz23YgAs7FSDf8/1 lNK4uVkB1Ojn4kD4vgb3BFHRWe7dz3XyrifwR5RPXUaLFMTzvqs+8ZK2qe3glwFlYj OSMCVo3Sax9FkjMYbNtdzoZMUcuMw2eu3uQT2aMA= Date: Wed, 30 Sep 2020 09:05:23 +0100 From: Will Deacon To: joro@8bytes.org Subject: [GIT PULL] iommu/arm-smmu: Updates for 5.10 Message-ID: <20200930080523.GA15805@willie-the-truck> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200930_040529_330557_12AA568F X-CRM114-Status: GOOD ( 17.70 ) X-Spam-Score: -5.7 (-----) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-5.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [198.145.29.99 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.5 DKIMWL_WL_HIGH DKIMwl.org - High trust sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jean-philippe@linaro.org, robin.murphy@arm.com, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, kernel-team@android.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org Hi Joerg, Please pull these arm-smmu updates for 5.10. Summary in the tag, but the big thing here is the long-awaited SVM enablement from Jean-Philippe. We're not quite done yet, but this pull extends the SMMUv3 driver so that we're very close to being able to share page-tables directly with the CPU. Other than that, there are a couple of things to note: 1. My PGP subkeys expired. I've updated them here: https://mirrors.edge.kernel.org/pub/linux/kernel/people/will/3E542FD9.asc and I've also mailed an updated copy for inclusion in the pgpkeys repository on kernel.org, but it hasn't landed yet: https://lore.kernel.org/keys/20200929222707.GA14916@willie-the-truck/T/#u 2. The SVM enablement has a dependency on some ASID allocation rework in the arm64 tree, so I made a shared branch and pulled that in here too. Please shout if you run into any problems. Will --->8 The following changes since commit f75aef392f869018f78cfedf3c320a6b3fcfda6b: Linux 5.9-rc3 (2020-08-30 16:01:54 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git tags/arm-smmu-updates for you to fetch changes up to e2eae09939a89e0994f7965ba3c676a5eac8b4b0: iommu/qcom: add missing put_device() call in qcom_iommu_of_xlate() (2020-09-29 16:25:52 +0100) ---------------------------------------------------------------- Arm SMMU updates for 5.10 - Continued SVM enablement, where page-table is shared with CPU - Groundwork to support integrated SMMU with Adreno GPU - Allow disabling of MSI-based polling on the kernel command-line - Minor driver fixes and cleanups (octal permissions, error messages, ...) ---------------------------------------------------------------- Barry Song (3): iommu/arm-smmu-v3: replace symbolic permissions by octal permissions for module parameter iommu/arm-smmu-v3: replace module_param_named by module_param for disable_bypass iommu/arm-smmu-v3: permit users to disable msi polling Jean-Philippe Brucker (9): iommu/arm-smmu-v3: Fix endianness annotations arm64: mm: Pin down ASIDs for sharing mm with devices arm64: cpufeature: Export symbol read_sanitised_ftr_reg() iommu/io-pgtable-arm: Move some definitions to a header iommu/arm-smmu-v3: Move definitions to a header iommu/arm-smmu-v3: Share process page tables iommu/arm-smmu-v3: Seize private ASID iommu/arm-smmu-v3: Check for SVA features iommu/arm-smmu-v3: Add SVA device feature Jordan Crouse (3): iommu/arm-smmu: Pass io-pgtable config to implementation specific function iommu/arm-smmu: Add support for split pagetables iommu/arm-smmu: Prepare for the adreno-smmu implementation Rob Clark (1): iommu/arm-smmu: Constify some helpers Will Deacon (1): Merge branch 'for-next/svm' of git://git.kernel.org/.../arm64/linux into for-joerg/arm-smmu/updates Yu Kuai (1): iommu/qcom: add missing put_device() call in qcom_iommu_of_xlate() Zenghui Yu (1): iommu/arm-smmu-v3: Fix l1 stream table size in the error message Zhou Wang (1): iommu/arm-smmu-v3: Ensure queue is read after updating prod pointer MAINTAINERS | 3 +- arch/arm64/include/asm/barrier.h | 1 + arch/arm64/include/asm/io.h | 1 + arch/arm64/include/asm/mmu.h | 3 + arch/arm64/include/asm/mmu_context.h | 11 +- arch/arm64/kernel/cpufeature.c | 1 + arch/arm64/mm/context.c | 105 ++- drivers/iommu/Kconfig | 10 + drivers/iommu/arm/arm-smmu-v3/Makefile | 5 +- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c | 248 +++++++ drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 843 +++++------------------- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 723 ++++++++++++++++++++ drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 3 +- drivers/iommu/arm/arm-smmu/arm-smmu.c | 102 ++- drivers/iommu/arm/arm-smmu/arm-smmu.h | 84 ++- drivers/iommu/arm/arm-smmu/qcom_iommu.c | 8 +- drivers/iommu/io-pgtable-arm.c | 27 +- drivers/iommu/io-pgtable-arm.h | 30 + 18 files changed, 1410 insertions(+), 798 deletions(-) create mode 100644 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c create mode 100644 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h create mode 100644 drivers/iommu/io-pgtable-arm.h