From: Jason Gunthorpe <jgg@nvidia.com>
To: "Tian, Kevin" <kevin.tian@intel.com>
Cc: "iommu@lists.linux.dev" <iommu@lists.linux.dev>,
Joerg Roedel <joro@8bytes.org>,
Robin Murphy <robin.murphy@arm.com>,
"virtualization@lists.linux.dev" <virtualization@lists.linux.dev>,
Will Deacon <will@kernel.org>,
Lu Baolu <baolu.lu@linux.intel.com>,
Eric Auger <eric.auger@redhat.com>,
Jean-Philippe Brucker <jean-philippe@linaro.org>,
"patches@lists.linux.dev" <patches@lists.linux.dev>
Subject: Re: [PATCH v4 3/5] iommu/virtio: Move to domain_alloc_paging()
Date: Thu, 10 Apr 2025 09:10:04 -0300 [thread overview]
Message-ID: <20250410121004.GS1778492@nvidia.com> (raw)
In-Reply-To: <BN9PR11MB52762A98AB82CD58C41A47D58CB72@BN9PR11MB5276.namprd11.prod.outlook.com>
On Thu, Apr 10, 2025 at 05:55:50AM +0000, Tian, Kevin wrote:
> > From: Jason Gunthorpe <jgg@nvidia.com>
> > Sent: Wednesday, April 9, 2025 12:36 AM
> >
> > +static struct iommu_domain *viommu_domain_alloc_identity(struct device
> > *dev)
> > +{
> > + struct viommu_endpoint *vdev = dev_iommu_priv_get(dev);
> > + struct iommu_domain *domain;
> > + int ret;
> > +
> > + if (virtio_has_feature(vdev->viommu->vdev,
> > + VIRTIO_IOMMU_F_BYPASS_CONFIG))
> > + return &viommu_identity_domain.domain;
> > +
>
> Does it make more sense to keep the @identity_domain field (same
> as all other drivers)
I think having two ways to get an identity domain is more confusion as
one will never be used..
> and rename this new ops to @domain_alloc_sw_identity() so it's clear
> that the new op is only used when identity is emulated using paging?
I think no, we had some use cases to return real identity domains too,
like DART can use this op to runtime detect if the iommu supports
identity.
s390 had something similar
Thanks,
Jason
next prev parent reply other threads:[~2025-04-10 12:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-08 16:35 [PATCH v4 0/5] Convert virtio-iommu to domain_alloc_paging() Jason Gunthorpe
2025-04-08 16:35 ` [PATCH v4 1/5] iommu/virtio: Break out bypass identity support into a global static Jason Gunthorpe
2025-04-10 5:46 ` Tian, Kevin
2025-04-08 16:35 ` [PATCH v4 2/5] iommu: Add domain_alloc_identity() Jason Gunthorpe
2025-04-10 5:48 ` Tian, Kevin
2025-04-08 16:35 ` [PATCH v4 3/5] iommu/virtio: Move to domain_alloc_paging() Jason Gunthorpe
2025-04-10 5:55 ` Tian, Kevin
2025-04-10 12:10 ` Jason Gunthorpe [this message]
2025-04-08 16:35 ` [PATCH v4 4/5] iommu: Do not call domain_alloc() in iommu_sva_domain_alloc() Jason Gunthorpe
2025-04-10 5:56 ` Tian, Kevin
2025-04-08 16:35 ` [PATCH v4 5/5] iommu: Hide ops.domain_alloc behind CONFIG_FSL_PAMU Jason Gunthorpe
2025-04-10 5:57 ` Tian, Kevin
2025-04-10 12:08 ` 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=20250410121004.GS1778492@nvidia.com \
--to=jgg@nvidia.com \
--cc=baolu.lu@linux.intel.com \
--cc=eric.auger@redhat.com \
--cc=iommu@lists.linux.dev \
--cc=jean-philippe@linaro.org \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=patches@lists.linux.dev \
--cc=robin.murphy@arm.com \
--cc=virtualization@lists.linux.dev \
--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;
as well as URLs for NNTP newsgroup(s).