From: Vasant Hegde <vasant.hegde@amd.com>
To: Robin Murphy <robin.murphy@arm.com>,
Baolu Lu <baolu.lu@linux.intel.com>,
Joerg Roedel <joro@8bytes.org>, Jason Gunthorpe <jgg@ziepe.ca>,
"iommu@lists.linux.dev" <iommu@lists.linux.dev>
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
Will Deacon <will@kernel.org>
Subject: Re: [RFC] iommu_ops->domain_alloc_paging() enhancement to support AMD IOMMU driver
Date: Mon, 1 Jul 2024 15:58:47 +0530 [thread overview]
Message-ID: <bb95c5c6-3441-42fe-a862-d1b68bb0a325@amd.com> (raw)
In-Reply-To: <a232872a-be56-4806-a3f6-09c889fa777a@arm.com>
Hi Robin,
On 6/28/2024 11:28 PM, Robin Murphy wrote:
> On 28/06/2024 6:08 pm, Vasant Hegde wrote:
>> Hi Robin,
>>
>> On 6/28/2024 6:36 PM, Robin Murphy wrote:
>>> On 28/06/2024 1:23 pm, Baolu Lu wrote:
>>>> On 2024/6/28 14:43, Vasant Hegde wrote:
>>>>> We are working on adding domain_alloc_paging() support in AMD driver and came
>>>>> across below issue.
>>>>>
>>
>> .../...
>>
>>>> Add an allocation flag seems to work. It doesn't indicate any type of
>>>> domain. Instead, it indicates the required iommu feature.
>>>>
>>>> Something like
>>>>
>>>> #define DOMAIN_ALLOC_FLAG_PASID 0x1
>>>>
>>>> means the allocated domain requires PASID to support on both device and
>>>> IOMMU. If the hardware lacks this support, it should return failure.
>>>
>>> Yeah, we could do with something sufficiently general, as we'll also have a need
>>> for passing pagetable-format options through to drivers to be able to replace
>>> iommu_set_pgtable_quirks().
>>
>> Sorry. I doubt I understood it completely. You mean to say:
>> Enhance iommu_domain_alloc() such that caller can pass any special quirks they
>> need and then pass those quirk flag along with the other flags we need (like
>> PASID support or not) to indivisual driver? So that at the end we are remove
>> ops->set_pgtable_quirks().
>>
>> Is that what you are thinking or something else?
>
> Basically, what set_pgtable_quirks does currently will need to be known at
> domain_alloc_paging time in order to convert arm-smmu to the latter properly.
> You don't need to worry about the public interface for it just yet, but if we're
> going to start extending the driver-level interface already then it would be
> good to plan ahead for what other domain properties we may want to accommodate
> callers requesting. The things we have as io-pgtable quirks today are definite
> ones (and those would happen to be OK as simple flags), but it's always seemed
> like a good idea for callers to be able to indicate their preference for other
> things like VA size (or even full domain geometry), even perhaps specific
> io-pgtable formats, such that the IOMMU driver can make the most effective
> choice about what it actually allocates.
Thanks for explaining. It does make sense to pass enough details to individual
drivers.
-Vasant
next prev parent reply other threads:[~2024-07-01 10:29 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-28 6:43 [RFC] iommu_ops->domain_alloc_paging() enhancement to support AMD IOMMU driver Vasant Hegde
2024-06-28 12:23 ` Baolu Lu
2024-06-28 13:06 ` Robin Murphy
2024-06-28 17:08 ` Vasant Hegde
2024-06-28 17:58 ` Robin Murphy
2024-07-01 10:28 ` Vasant Hegde [this message]
2024-06-28 14:50 ` Vasant Hegde
2024-06-28 15:34 ` Jason Gunthorpe
2024-06-28 13:03 ` Jason Gunthorpe
2024-06-28 17:49 ` Vasant Hegde
2024-06-28 18:04 ` Jason Gunthorpe
2024-07-01 10:48 ` Vasant Hegde
2024-07-01 17:26 ` Jason Gunthorpe
2024-07-03 5:42 ` Vasant Hegde
2024-07-03 6:57 ` Yi Liu
2024-07-09 18:23 ` Jason Gunthorpe
2024-07-10 4:17 ` Yi Liu
2024-07-11 23:49 ` Jason Gunthorpe
2024-07-12 13:40 ` Robin Murphy
2024-07-12 13:53 ` Jason Gunthorpe
2024-07-12 15:12 ` Robin Murphy
2024-07-12 15:19 ` Jason Gunthorpe
2024-07-15 8:46 ` Yi Liu
2024-07-11 10:15 ` Vasant Hegde
2024-07-11 13:56 ` Yi Liu
2024-07-12 1:39 ` Baolu Lu
2024-07-12 2:43 ` Yi Liu
2024-07-15 10:39 ` Vasant Hegde
2024-07-16 7:43 ` Yi Liu
2024-07-16 13:41 ` 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=bb95c5c6-3441-42fe-a862-d1b68bb0a325@amd.com \
--to=vasant.hegde@amd.com \
--cc=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@ziepe.ca \
--cc=joro@8bytes.org \
--cc=robin.murphy@arm.com \
--cc=suravee.suthikulpanit@amd.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 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).