From: Baolu Lu <baolu.lu@linux.intel.com>
To: Robin Murphy <robin.murphy@arm.com>,
Teddy Astie <teddy.astie@vates.tech>,
Jason Gunthorpe <jgg@ziepe.ca>
Cc: baolu.lu@linux.intel.com, xen-devel@lists.xenproject.org,
iommu@lists.linux.dev, "Juergen Gross" <jgross@suse.com>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Oleksandr Tyshchenko" <oleksandr_tyshchenko@epam.com>,
"Joerg Roedel" <joro@8bytes.org>, "Will Deacon" <will@kernel.org>,
"Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
Subject: Re: [RFC PATCH] iommu/xen: Add Xen PV-IOMMU driver
Date: Tue, 25 Jun 2024 09:18:07 +0800 [thread overview]
Message-ID: <adac26cc-0d9e-4413-a0b7-c1d6929b9543@linux.intel.com> (raw)
In-Reply-To: <4c941977-868a-4bd0-9c57-eb58255d95bf@arm.com>
On 6/24/24 7:09 PM, Robin Murphy wrote:
> On 2024-06-23 4:21 am, Baolu Lu wrote:
>> On 6/21/24 11:09 PM, Teddy Astie wrote:
>>> Le 19/06/2024 à 18:30, Jason Gunthorpe a écrit :
>>>> On Thu, Jun 13, 2024 at 01:50:22PM +0000, Teddy Astie wrote:
>>>>
>>>>> +struct iommu_domain *xen_iommu_domain_alloc(unsigned type)
>>>>> +{
>>>>> + struct xen_iommu_domain *domain;
>>>>> + u16 ctx_no;
>>>>> + int ret;
>>>>> +
>>>>> + if (type & IOMMU_DOMAIN_IDENTITY) {
>>>>> + /* use default domain */
>>>>> + ctx_no = 0;
>>>> Please use the new ops, domain_alloc_paging and the static identity
>>>> domain.
>>> Yes, in the v2, I will use this newer interface.
>>>
>>> I have a question on this new interface : is it valid to not have a
>>> identity domain (and "default domain" being blocking); well in the
>>> current implementation it doesn't really matter, but at some point, we
>>> may want to allow not having it (thus making this driver mandatory).
>>
>> It's valid to not have an identity domain if "default domain being
>> blocking" means a paging domain with no mappings.
>>
>> In the iommu driver's iommu_ops::def_domain_type callback, just always
>> return IOMMU_DOMAIN_DMA, which indicates that the iommu driver doesn't
>> support identity translation.
>
> That's not necessary - if neither ops->identity_domain nor
> ops->domain_alloc(IOMMU_DOMAIN_IDENTITY) gives a valid domain then we
> fall back to IOMMU_DOMAIN_DMA anyway.
Yes. That's true.
Best regards,
baolu
prev parent reply other threads:[~2024-06-25 1:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-13 13:50 [RFC PATCH] iommu/xen: Add Xen PV-IOMMU driver Teddy Astie
2024-06-13 14:32 ` Jan Beulich
2024-06-17 13:36 ` Teddy Astie
2024-06-17 13:43 ` Jan Beulich
2024-06-19 16:30 ` Jason Gunthorpe
2024-06-21 15:09 ` Teddy Astie
2024-06-23 3:21 ` Baolu Lu
2024-06-24 11:09 ` Robin Murphy
2024-06-25 1:18 ` Baolu Lu [this message]
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=adac26cc-0d9e-4413-a0b7-c1d6929b9543@linux.intel.com \
--to=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@ziepe.ca \
--cc=jgross@suse.com \
--cc=joro@8bytes.org \
--cc=marmarek@invisiblethingslab.com \
--cc=oleksandr_tyshchenko@epam.com \
--cc=robin.murphy@arm.com \
--cc=sstabellini@kernel.org \
--cc=teddy.astie@vates.tech \
--cc=will@kernel.org \
--cc=xen-devel@lists.xenproject.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