Linux IOMMU Development
 help / color / mirror / Atom feed
From: Michael Shavit <mshavit@google.com>
To: iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	 linux-kernel@vger.kernel.org
Cc: will@kernel.org, robin.murphy@arm.com, nicolinc@nvidia.com,
	 jean-philippe@linaro.org, jgg@nvidia.com, tina.zhang@intel.com,
	 Michael Shavit <mshavit@google.com>,
	Jason Gunthorpe <jgg@ziepe.ca>, Joerg Roedel <joro@8bytes.org>,
	 Kevin Tian <kevin.tian@intel.com>,
	 "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Lu Baolu <baolu.lu@linux.intel.com>,
	 Mark Brown <broonie@kernel.org>,
	Tomas Krcka <krckatom@amazon.de>,
	 Yicong Yang <yangyicong@hisilicon.com>
Subject: [PATCH v1 0/3] Clean-up arm-smmu-v3-sva.c: remove arm_smmu_bond
Date: Tue,  5 Sep 2023 19:49:11 +0800	[thread overview]
Message-ID: <20230905115013.1572240-1-mshavit@google.com> (raw)


This small series was originally part of a larger effort to support
set_dev_pasid in arm-smmu-v3.c and a related SVA refactoring. But it can
also stand on its own as an initial and prepatory clean-up.

The crux of this series relies on the observation that SVA won't
allocate multiple SVA domains for the same device and mm pair. There's
therefore no reason for the driver to try to normalize data allocated
for a device/mm pair across set_dev_pasid calls. This simplification
then allows set_dev_pasid to use the SVA iommu_domain to hold
information instead of allocating a "bond" to represent the attachement.
Note that long term, we'll likely want to represent the SVA domain using
the same arm_smmu_domain struct used in arm-smmu-v3. This series serves
as an interim step to make those later refactors easier to reason about.

Note that arm-smmu-v3-sva performs a second level of normalization by
mapping multiple bonds (now SVA domains) attached to devices with the
same SMMU (if those devices have the same RID domain attached) to a
single arm_smmu_mmu_notifier. This is not affected by these patches.


Michael Shavit (3):
  iommu/arm-smmu-v3-sva: Remove unused iommu_sva handle
  iommu/arm-smmu-v3-sva: Remove bond refcount
  iommu/arm-smmu-v3-sva: Remove arm_smmu_bond

 .../iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c   | 90 ++++++-------------
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c   |  1 -
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h   |  2 +-
 3 files changed, 28 insertions(+), 65 deletions(-)


base-commit: 6eaae198076080886b9e7d57f4ae06fa782f90ef
-- 
2.42.0.283.g2d96d420d3-goog


             reply	other threads:[~2023-09-05 11:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-05 11:49 Michael Shavit [this message]
2023-09-05 11:49 ` [PATCH v1 1/3] iommu/arm-smmu-v3-sva: Remove unused iommu_sva handle Michael Shavit
2023-09-05 12:36   ` Jason Gunthorpe
2023-09-05 11:49 ` [PATCH v1 2/3] iommu/arm-smmu-v3-sva: Remove bond refcount Michael Shavit
2023-09-05 12:38   ` Jason Gunthorpe
2023-09-05 11:49 ` [PATCH v1 3/3] iommu/arm-smmu-v3-sva: Remove arm_smmu_bond Michael Shavit
2023-09-05 12:42   ` Jason Gunthorpe
2023-09-05 13:14     ` Michael Shavit
2023-09-05 18:16       ` Jason Gunthorpe
2023-09-05 12:35 ` [PATCH v1 0/3] Clean-up arm-smmu-v3-sva.c: remove arm_smmu_bond Jason Gunthorpe
2023-09-05 13:24   ` Michael Shavit
2023-09-05 13:32     ` Jason Gunthorpe
2023-10-12 18:06 ` Will Deacon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230905115013.1572240-1-mshavit@google.com \
    --to=mshavit@google.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=iommu@lists.linux.dev \
    --cc=jean-philippe@linaro.org \
    --cc=jgg@nvidia.com \
    --cc=jgg@ziepe.ca \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=krckatom@amazon.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolinc@nvidia.com \
    --cc=robin.murphy@arm.com \
    --cc=tina.zhang@intel.com \
    --cc=will@kernel.org \
    --cc=yangyicong@hisilicon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox