From: Nicolin Chen <nicolinc@nvidia.com>
To: <jgg@nvidia.com>
Cc: <robin.murphy@arm.com>, <joro@8bytes.org>, <will@kernel.org>,
<kevin.tian@intel.com>, <baolu.lu@linux.intel.com>,
<iommu@lists.linux.dev>, <linux-kernel@vger.kernel.org>,
<nathan@kernel.org>, <arnd@arndb.de>
Subject: Re: [PATCH v5 0/3] iommu: Clean up cookie and sw_msi in struct iommu_domain
Date: Mon, 24 Mar 2025 21:14:23 -0700 [thread overview]
Message-ID: <Z+Itnw4ys6dmDsc+@nvidia.com> (raw)
In-Reply-To: <cover.1742871535.git.nicolinc@nvidia.com>
On Mon, Mar 24, 2025 at 09:05:14PM -0700, Nicolin Chen wrote:
> This is a clean-up series for the previous sw_msi Part-1 core series. It's
> on github:
> https://github.com/nicolinc/iommufd/commits/iommufd_msi_cleanup-v5
>
> Changelog
> v5
> * Add IMPORT line for IOMMUFD_INTERNAL and change IOMMUFD_DRIVER_CORE
> to a "bool" module, fixing build module errors reported by Arnd:
> https://lore.kernel.org/all/20250324210329.2809869-1-arnd@kernel.org/
> * In iommu_dma_prepare_msi(), let all IDENTITY DOMAINs pass through,
> fixing the regression with IDENTITY domains reported by Nathan:
> https://lore.kernel.org/linux-iommu/20250324162558.GA198799@ax162/
> base-commit: da0c56520e880441d0503d0cf0d6853dcfb5f1a4
Hi Jason,
Assuming that you want to replace the commits in your for-next
tree with these patches, I rebased them on this commit:
da0c56520e88 iommu/arm-smmu-v3: Set MEV bit in nested STE for DoS mitigations
Again, sorry for the trouble.
Nicolin
P.S. Attaching git-diff against the current commit in your tree
"git diff -U1 e009e088d88e8..nicolinc/iommufd_msi_cleanup-v5":
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 0f4cc15ded1c..d96e6fabb4da 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -3653,3 +3653,4 @@ int iommu_dma_prepare_msi(struct msi_desc *desc, phys_addr_t msi_addr)
mutex_lock(&group->mutex);
- if (group->domain) {
+ /* An IDENTITY domain must pass through */
+ if (group->domain && group->domain->type != IOMMU_DOMAIN_IDENTITY) {
switch (group->domain->cookie_type) {
diff --git a/drivers/iommu/iommufd/Kconfig b/drivers/iommu/iommufd/Kconfig
index 0a07f9449fd9..2beeb4f60ee5 100644
--- a/drivers/iommu/iommufd/Kconfig
+++ b/drivers/iommu/iommufd/Kconfig
@@ -2,3 +2,3 @@
config IOMMUFD_DRIVER_CORE
- tristate
+ bool
default (IOMMUFD_DRIVER || IOMMUFD) if IOMMUFD!=n
diff --git a/drivers/iommu/iommufd/driver.c b/drivers/iommu/iommufd/driver.c
index 352513974154..a08ff0f37fc6 100644
--- a/drivers/iommu/iommufd/driver.c
+++ b/drivers/iommu/iommufd/driver.c
@@ -249,2 +249,3 @@ EXPORT_SYMBOL_NS_GPL(iommufd_sw_msi, "IOMMUFD");
MODULE_DESCRIPTION("iommufd code shared with builtin modules");
+MODULE_IMPORT_NS("IOMMUFD_INTERNAL");
MODULE_LICENSE("GPL");
next prev parent reply other threads:[~2025-03-25 4:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-25 4:05 [PATCH v5 0/3] iommu: Clean up cookie and sw_msi in struct iommu_domain Nicolin Chen
2025-03-25 4:05 ` [PATCH v5 1/3] iommu: Sort out domain user data Nicolin Chen
2025-03-25 4:05 ` [PATCH v5 2/3] iommufd: Move iommufd_sw_msi and related functions to driver.c Nicolin Chen
2025-03-25 4:05 ` [PATCH v5 3/3] iommu: Drop sw_msi from iommu_domain Nicolin Chen
2025-03-25 4:14 ` Nicolin Chen [this message]
2025-03-25 12:40 ` [PATCH v5 0/3] iommu: Clean up cookie and sw_msi in struct iommu_domain Jason Gunthorpe
2025-03-25 13:21 ` Jason Gunthorpe
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=Z+Itnw4ys6dmDsc+@nvidia.com \
--to=nicolinc@nvidia.com \
--cc=arnd@arndb.de \
--cc=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
/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.