From: Jason Gunthorpe <jgg@ziepe.ca>
To: Lu Baolu <baolu.lu@linux.intel.com>
Cc: Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Kevin Tian <kevin.tian@intel.com>,
shangsong2@lenovo.com, Dave Jiang <dave.jiang@intel.com>,
iommu@lists.linux.dev, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH 1/1] iommu/vt-d: Assign owner to the static identity domain
Date: Tue, 22 Apr 2025 16:15:54 -0300 [thread overview]
Message-ID: <20250422191554.GC1213339@ziepe.ca> (raw)
In-Reply-To: <20250422075422.2084548-1-baolu.lu@linux.intel.com>
On Tue, Apr 22, 2025 at 03:54:22PM +0800, Lu Baolu wrote:
> diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
> index cb0b993bebb4..63c9c97ccf69 100644
> --- a/drivers/iommu/intel/iommu.c
> +++ b/drivers/iommu/intel/iommu.c
> @@ -4385,6 +4385,7 @@ static struct iommu_domain identity_domain = {
> .attach_dev = identity_domain_attach_dev,
> .set_dev_pasid = identity_domain_set_dev_pasid,
> },
> + .owner = &intel_iommu_ops,
> };
Is this a systemic mistake in all the static domains in all the
drivers?
Maybe a bigger check is a more complete fix:
static bool iommu_domain_compatible(struct device *dev,
struct iommu_domain *domain)
{
const struct iommu_ops *ops = dev_iommu_ops(dev);
if (domain->owner == ops)
return true;
/* For static domains owner isn't set */
if (ops->blocked_domain == domain || ops->identity_domain == domain)
return true;
return false;
}
Jason
next prev parent reply other threads:[~2025-04-22 19:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-22 7:54 [PATCH 1/1] iommu/vt-d: Assign owner to the static identity domain Lu Baolu
2025-04-22 14:46 ` Dave Jiang
2025-04-22 19:15 ` Jason Gunthorpe [this message]
2025-04-23 1:02 ` Baolu Lu
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=20250422191554.GC1213339@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=baolu.lu@linux.intel.com \
--cc=dave.jiang@intel.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=shangsong2@lenovo.com \
--cc=stable@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox