From mboxrd@z Thu Jan 1 00:00:00 1970 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 359D9C001DC for ; Thu, 27 Jul 2023 18:28:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: Mime-Version: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=L3p3sLubbc2VbrQljBZhsF0qI3VAeLskvd9XbnMlKF8=; b=w60 pgFewFfNQowean4ZNz0lxD2g6hoKJrpMbewkKMgDnJl5ZsdL/BYgRW6v95+y0qjtBrm82oMVaq56T NbtYSC/VJHeQZFxbRwrcR9B7RWzTQz7+p8vtezl+1iFiNmSQrcCBeoe/0A7/wTUNCOmaHkItyCG22 By4VVvAzCUDLH+4ozNOu/OSB0GygDDnfZygK6Fc1vaPPHGaUeKDggsRkOd5JxlKD/70YmbzRfFZzE 8qeqHacTav0tOuWwmEawjPaFgS9079yd688qAiDcjJVlPrszZtLmmJdyy3pV3yZUb9lOMGNBTj5jk Tk2jTfqkVH+v8NkrZY9daXujbLDW88w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qP5ic-0008be-1w; Thu, 27 Jul 2023 18:28:10 +0000 Received: from mail-yw1-x114a.google.com ([2607:f8b0:4864:20::114a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qP5iZ-0008a5-0G for linux-arm-kernel@lists.infradead.org; Thu, 27 Jul 2023 18:28:08 +0000 Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-5844e92ee6bso12849787b3.3 for ; Thu, 27 Jul 2023 11:28:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1690482483; x=1691087283; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=LdqBlA80Wg7TTifhsmcWRJBqXp5WhnKqMSkVfyET1zg=; b=2ORqFkA2f3Z9uBQcEXJuPsfPoD3pbCZzEg9K5vjpSb+ANKuVree8tmQXRURnLx56ld kaGAjGT3BxZrdF3VUT+aDQokKYfTI8kUwreH2Ab+JrMFGHHJcKLVDG2OXYPZ3VLXA/Fv 6stescGuyXhxkUxbS5ZRNT907yR2cFGVnzi34CqfJbBZ2Z+D5sawwHlSDSnFU104J90i glA8cm4ApX4r3QoQCorCX6/v+SGlMnEfQVVz+ZVvLaIBZSFCBwZ0nBPt7llVhUy8I30v wq5c/3NJErPcbxT2Qp0L2yDOnvEnZGEV87lSNUYeBc0TkL8RMv3mWzLs08LIc7xWbRRW ya0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690482483; x=1691087283; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=LdqBlA80Wg7TTifhsmcWRJBqXp5WhnKqMSkVfyET1zg=; b=i48AvbGMSVJParKSWLruLrIhHvcyyFiCOmFZdXxJ0RD46hS+fOB10LImP6CUTgToLY 3OvLjbxU9itaxBlvQBswHjKQ/HyeW1hHupq7qHGXETL0AOsRMRXbKtaAsJNAKXVUv0hX mdcDy7KhyymqPliUi4yy4CPh0topSnrUVQOpSizTi3lgZrt9ZdpI6Z88mKKgMdMsKHOf 8RorUeywod5VfDI8BsMTpvBWACsDN+hotyBzkXSBQKVJ6Qs2pfwQQaNGTU2JfZNy0d5l bn0jmoFjfrfA/+c8bKjjyqpZH8D4htmnoRG7rtZs0l4QWNjB33/9sCsuslM72b9MPGFf FRLw== X-Gm-Message-State: ABy/qLagrM1u13BOTIAhcy65U5c6gHSmE0Zko+fS9G2v0Bqc8TewtPxd ksutS+3b+hlaM/Li1fheeVIobpvSP0Rb X-Google-Smtp-Source: APBJJlFu1RmIM9I2XbdYtCItJzT1I4AJtth2QNNJiNYVh4Yo5EZk+wFwLwBJ0TaQyZTQq3wAjZaAjFpkxTME X-Received: from mshavit.ntc.corp.google.com ([2401:fa00:95:20c:780f:26da:d952:3463]) (user=mshavit job=sendgmr) by 2002:a05:690c:72c:b0:576:cd91:b888 with SMTP id bt12-20020a05690c072c00b00576cd91b888mr805ywb.0.1690482483158; Thu, 27 Jul 2023 11:28:03 -0700 (PDT) Date: Fri, 28 Jul 2023 02:26:16 +0800 Mime-Version: 1.0 X-Mailer: git-send-email 2.41.0.585.gd2178a4bd4-goog Message-ID: <20230727182647.4106140-1-mshavit@google.com> Subject: [PATCH v1 0/7] Refactor the SMMU's CD table ownership From: Michael Shavit To: Will Deacon , Robin Murphy , Joerg Roedel Cc: Michael Shavit , jean-philippe@linaro.org, nicolinc@nvidia.com, jgg@nvidia.com, baolu.lu@linux.intel.com, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230727_112807_118937_4C7A86A2 X-CRM114-Status: GOOD ( 10.88 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi all, This series refactors stage 1 domains so that they describe a single CD entry. These entries are now inserted into a CD table that is owned by the arm_smmu_master instead of the domain. This is conceptually cleaner and unblocks other features, such as attaching domains with PASID (for unmanaged/dma domains). This patch series was originally part of a larger patch series that implemented the set_dev_pasid callback for non-SVA domains but is now split into a distinct series. This patch series is also available on gerrit with Jean's SMMU test engine patches cherry-picked on top for testing: https://linux-review.git.corp.google.com/c/linux/kernel/git/torvalds/linux/+/24729 Thanks, Michael Shavit Changelog v1: * Replace s1_cfg with arm_smmu_ctx_desc_cfg representing the CD table * Assume that the CD table is owned by the SMMU master for most operations. This is forward-compatible with the nested patch series as these operations wouldn't be called when the installed CD table comes from nested domains. * Split off as a distinct patch series Split-off from: https://lore.kernel.org/all/20230621063825.268890-1-mshavit@google.com/ Michael Shavit (7): iommu/arm-smmu-v3: Move ctx_desc out of s1_cfg iommu/arm-smmu-v3: Replace s1_cfg with ctx_desc_cfg iommu/arm-smmu-v3: Encapsulate ctx_desc_cfg init in alloc_cd_tables iommu/arm-smmu-v3: move stall_enabled to the cd table iommu/arm-smmu-v3: Skip cd sync if CD table isn't active iommu/arm-smmu-v3: Refactor write_ctx_desc iommu/arm-smmu-v3: Move CD table to arm_smmu_master .../iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c | 35 +++- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 167 ++++++++---------- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 39 ++-- 3 files changed, 123 insertions(+), 118 deletions(-) base-commit: 0a8db05b571ad5b8d5c8774a004c0424260a90bd -- 2.41.0.585.gd2178a4bd4-goog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel