From patchwork Thu Sep 12 12:59:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 13802122 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4525CEED602 for ; Thu, 12 Sep 2024 13:04:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=HXezDwgUqjfyAdpS6DxsJgQqMb/EXSte/2JqXRU8r9Q=; b=c/Iv3AXXVdlZklDM/8aKLZSUTK +KmdeW4a2LC0pzy5YzxAzaVH87TYmah+smpFRdeO8LBie4AbqwDeHKM06Z1ihRS3PnTsmR+mTfosM O2xq0lHspJZaWGTOgn6S+1VyMDgP4KET834X1grT8k5J1sBZh7h9YP4S+BHLV23RvJqonuD/G07TD sfM791NqqI5HKgY0bdxnizWtNh4WXBQlO0J6IS0r9SATgz5GfDvkrXL7q9OAKAw1kPYSiEb7XQ6dr wUCU2B7KxlqQkqyS9emzS1IsHT9T0D4M4jD9BExi2asGxSEJ6Cr40OQGOJbTjeOJkJpmSFSvphICw AN9sNm8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sojUH-0000000D8Og-0Mx2; Thu, 12 Sep 2024 13:03:53 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sojQC-0000000D7kZ-4B6c for linux-arm-kernel@lists.infradead.org; Thu, 12 Sep 2024 13:01:08 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 8752DA454A2; Thu, 12 Sep 2024 12:59:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95040C4CEC3; Thu, 12 Sep 2024 12:59:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1726145979; bh=AvtzSC3Csk3z8NPXkiPtAx9GovjKGdqPfKXOIZCX9io=; h=Date:From:To:Cc:Subject:From; b=MNnBqrhYNKwn+5KcG4nGejpUPJa5NNohyz7PxGVEtxVTB7JAHO5VN14tbtFOHKuFA oxuIUJsn1DhWFko6lPDOsdR9DxjPSHxKlOmxcIo94Lrc0wjKFJN4/AwOj24SdPh7Cr I+5yAMOEwV8sn73fIuDNnQhbKec22uRfmYt5eM0TXPrioe15hHwKx9untYP4ym2Fir LltFOvZkoYxxznr5Yvr1aovGjty6gNyiNmuvQBqWabzhqeb1ttr4pYCz+DHpH3fr11 FkYHBknjL6NSMv7Q1/7v12K6pt9m+4IzyQMvu0xLQN+lA/RlKYu1SRgoREiq4eiFus MtIlU7h5H7oTg== Date: Thu, 12 Sep 2024 13:59:35 +0100 From: Will Deacon To: joro@8bytes.org Cc: iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, robin.murphy@arm.com, kernel-team@android.com Subject: [GIT PULL] iommu/arm-smmu: Updates for 6.12 Message-ID: <20240912125934.GA23244@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-20240912_055941_191415_3D000D20 X-CRM114-Status: GOOD ( 16.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Joerg, Please pull these Arm SMMU updates for v6.12. The big new feature is support for NVIDIA's virtual command queue implementation for SMMUv3, but everything is summarised in the tag. ** Please note **: I've already pushed this to the arm/smmu branch for -next coverage, but I thought sending a pull request was still useful for the records and the signed tag. If you want to recreate the branch, please feel free. See you at LPC! Cheers, Will --->8 The following changes since commit 7c626ce4bae1ac14f60076d00eafe71af30450ba: Linux 6.11-rc3 (2024-08-11 14:27:14 -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 f1c6cf8e7ab9d7498ee70c69d5093165952d3595: Merge branch 'for-joerg/arm-smmu/bindings' into for-joerg/arm-smmu/updates (2024-09-12 12:54:14 +0100) ---------------------------------------------------------------- Arm SMMU updates for 6.12 - SMMUv2: * Devicetree binding updates for Qualcomm MMU-500 implementations. * Extend workarounds for broken Qualcomm hypervisor to avoid touching features that are not available (e.g. 16KiB page support, reserved context banks). - SMMUv3: * Support for NVIDIA's custom virtual command queue hardware. * Fix Stage-2 stall configuration and extend tests to cover this area. * A bunch of driver cleanups, including simplification of the master rbtree code. - Plus minor cleanups and fixes across both drivers. ---------------------------------------------------------------- Dan Carpenter (2): iommu/arm-smmu-v3: Fix a NULL vs IS_ERR() check iommu/tegra241-cmdqv: Fix ioremap() error handling in probe() Dmitry Baryshkov (1): iommu/arm-smmu-qcom: apply num_context_bank fixes for SDM630 / SDM660 Jason Gunthorpe (10): iommu/arm-smmu-v3: Add struct arm_smmu_impl_ops iommu/arm-smmu-v3: Use the new rb tree helpers iommu/arm-smmu-v3: Add arm_smmu_strtab_l1/2_idx() iommu/arm-smmu-v3: Add types for each level of the 2 level stream table iommu/arm-smmu-v3: Reorganize struct arm_smmu_strtab_cfg iommu/arm-smmu-v3: Remove strtab_base/cfg iommu/arm-smmu-v3: Do not use devm for the cd table allocations iommu/arm-smmu-v3: Shrink the cdtab l1_desc array iommu/arm-smmu-v3: Add types for each level of the CD table iommu/arm-smmu-v3: Reorganize struct arm_smmu_ctx_desc_cfg Konrad Dybcio (1): iommu/arm-smmu-qcom: Work around SDM845 Adreno SMMU w/ 16K pages Marc Gonzalez (1): iommu/arm-smmu-qcom: hide last LPASS SMMU context bank from linux Mostafa Saleh (2): iommu/arm-smmu-v3: Match Stall behaviour for S2 iommu/arm-smmu-v3-test: Test masters with stall enabled Nate Watterson (1): iommu/arm-smmu-v3: Add in-kernel support for NVIDIA Tegra241 (Grace) CMDQV Nicolin Chen (11): iommu/arm-smmu-v3: Issue a batch of commands to the same cmdq iommu/arm-smmu-v3: Pass in cmdq pointer to arm_smmu_cmdq_build_sync_cmd iommu/arm-smmu-v3: Pass in cmdq pointer to arm_smmu_cmdq_init iommu/arm-smmu-v3: Make symbols public for CONFIG_TEGRA241_CMDQV iommu/arm-smmu-v3: Add ARM_SMMU_OPT_TEGRA241_CMDQV iommu/arm-smmu-v3: Add acpi_smmu_iort_probe_model for impl iommu/arm-smmu-v3: Start a new batch if new command is not supported iommu/tegra241-cmdqv: Limit CMDs for VCMDQs of a guest owned VINTF iommu/tegra241-cmdqv: Fix -Wformat-truncation warnings in lvcmdq_error_header iommu/tegra241-cmdqv: Drop static at local variable iommu/tegra241-cmdqv: Do not allocate vcmdq until dma_set_mask_and_coherent Nikunj Kela (1): dt-bindings: arm-smmu: document the support on SA8255p Rob Clark (1): iommu/arm-smmu: Un-demote unhandled-fault msg Will Deacon (1): Merge branch 'for-joerg/arm-smmu/bindings' into for-joerg/arm-smmu/updates Zhang Zekun (1): iommu/arm-smmu-v3: Remove the unused empty definition Zhenhua Huang (1): dt-bindings: arm-smmu: Add compatible for QCS8300 SoC .../devicetree/bindings/iommu/arm,smmu.yaml | 5 + MAINTAINERS | 1 + drivers/iommu/Kconfig | 11 + drivers/iommu/arm/arm-smmu-v3/Makefile | 1 + drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c | 83 +- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 576 +++++++------ drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 137 +++- drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c | 909 +++++++++++++++++++++ drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 28 + drivers/iommu/arm/arm-smmu/arm-smmu.c | 2 +- 10 files changed, 1463 insertions(+), 290 deletions(-) create mode 100644 drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c