From: Yi Liu <yi.l.liu@intel.com>
To: joro@8bytes.org, jgg@nvidia.com, kevin.tian@intel.com,
baolu.lu@linux.intel.com
Cc: eric.auger@redhat.com, nicolinc@nvidia.com, kvm@vger.kernel.org,
chao.p.peng@linux.intel.com, yi.l.liu@intel.com,
iommu@lists.linux.dev, zhenzhong.duan@intel.com,
vasant.hegde@amd.com, will@kernel.org
Subject: [PATCH v5 0/7] Support attaching PASID to the blocked_domain
Date: Wed, 13 Nov 2024 05:46:06 -0800 [thread overview]
Message-ID: <20241113134613.7173-1-yi.l.liu@intel.com> (raw)
During the review of iommufd pasid series, Kevin and Jason suggested
attaching PASID to the blocked domain hence replacing the usage of
remove_dev_pasid() op [1]. This makes sense as it makes the PASID path
aligned with the RID path which attaches the RID to the blocked_domain
when it is to be blocked. To do it, it requires passing the old domain
to the iommu driver. This has been done in [2].
This series makes the Intel iommu driver, ARM SMMUv3 driver and AMD iommu
driver support attaching PASID to the blocked domain. And in the end remove
the remove_dev_pasid op from iommu_ops.
[1] https://lore.kernel.org/linux-iommu/20240816130202.GB2032816@nvidia.com/
[2] https://lore.kernel.org/linux-iommu/20241108021406.173972-1-baolu.lu@linux.intel.com/
v5:
- Fix an issue spotted by Baolu in patch 01 of v4. The new version lifts the
group check to be the first check, hence it can ensure a valid iommu_ops
returned by dev_iommu_ops(). Per this changes, it also removes the
dev_has_iommu() check as it is duplicated with the group check. Due to the
changes, drop the r-b tags on this patch.
- Add Baolu's r-b tag.
v4: https://lore.kernel.org/linux-iommu/20241108120427.13562-1-yi.l.liu@intel.com/
- Remove unnecessary braces in patch 02 (Vasant)
- Minor tweaks to patch 01 and 03 (Kevin)
- Add r-b tags from Jason, Vasant, Kevin
v3: https://lore.kernel.org/linux-iommu/20241104132033.14027-1-yi.l.liu@intel.com/
- Add a patch to check remove_dev_pasid() in iommu_attach_device_pasid()
- Split patch 01 of v2 into two patches, drop the r-b of this patch due the
split.
- Add AMD iommu blocked domain pasid support (Jason)
- Remove the remove_dev_pasid op as all the iommu drivers that support pasid
attach have supported attaching pasid to blocked domain.
v2: https://lore.kernel.org/linux-iommu/20241018055824.24880-1-yi.l.liu@intel.com/#t
- Add Kevin's r-b
- Adjust the order of patch 03 of v1, it should be the first patch (Baolu)
v1: https://lore.kernel.org/linux-iommu/20240912130653.11028-1-yi.l.liu@intel.com/
Regards,
Yi Liu
Jason Gunthorpe (1):
iommu/arm-smmu-v3: Make the blocked domain support PASID
Yi Liu (6):
iommu: Prevent pasid attach if no ops->remove_dev_pasid
iommu: Consolidate the ops->remove_dev_pasid usage into a helper
iommu: Detaching pasid by attaching to the blocked_domain
iommu/vt-d: Make the blocked domain support PASID
iommu/amd: Make the blocked domain support PASID
iommu: Remove the remove_dev_pasid op
drivers/iommu/amd/iommu.c | 10 +++++-
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 12 +++----
drivers/iommu/intel/iommu.c | 15 ++++++---
drivers/iommu/iommu.c | 35 +++++++++++++--------
include/linux/iommu.h | 5 ---
5 files changed, 48 insertions(+), 29 deletions(-)
--
2.34.1
next reply other threads:[~2024-11-13 13:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-13 13:46 Yi Liu [this message]
2024-11-13 13:46 ` [PATCH v5 1/7] iommu: Prevent pasid attach if no ops->remove_dev_pasid Yi Liu
2024-11-15 14:58 ` Jason Gunthorpe
2024-11-13 13:46 ` [PATCH v5 2/7] iommu: Consolidate the ops->remove_dev_pasid usage into a helper Yi Liu
2024-11-13 13:46 ` [PATCH v5 3/7] iommu: Detaching pasid by attaching to the blocked_domain Yi Liu
2024-11-13 13:46 ` [PATCH v5 4/7] iommu/arm-smmu-v3: Make the blocked domain support PASID Yi Liu
2024-11-13 13:46 ` [PATCH v5 5/7] iommu/vt-d: " Yi Liu
2024-11-13 13:46 ` [PATCH v5 6/7] iommu/amd: " Yi Liu
2024-11-13 13:46 ` [PATCH v5 7/7] iommu: Remove the remove_dev_pasid op Yi Liu
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=20241113134613.7173-1-yi.l.liu@intel.com \
--to=yi.l.liu@intel.com \
--cc=baolu.lu@linux.intel.com \
--cc=chao.p.peng@linux.intel.com \
--cc=eric.auger@redhat.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=nicolinc@nvidia.com \
--cc=vasant.hegde@amd.com \
--cc=will@kernel.org \
--cc=zhenzhong.duan@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.