From: Jason Gunthorpe <jgg@nvidia.com>
To: Vasant Hegde <vasant.hegde@amd.com>
Cc: iommu@lists.linux.dev, Joerg Roedel <joro@8bytes.org>,
Robin Murphy <robin.murphy@arm.com>,
Will Deacon <will@kernel.org>, Joerg Roedel <jroedel@suse.de>,
Jerry Snitselaar <jsnitsel@redhat.com>,
patches@lists.linux.dev,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Subject: Re: [PATCH rc] iommu/amd: Fix geometry.aperture_end for V2 tables
Date: Wed, 28 May 2025 08:57:08 -0300 [thread overview]
Message-ID: <20250528115708.GQ61950@nvidia.com> (raw)
In-Reply-To: <8858d4d6-d360-4ef0-935c-bfd13ea54f42@amd.com>
On Wed, May 28, 2025 at 02:17:56PM +0530, Vasant Hegde wrote:
> > Yes, it should use bit 56 for address translation, that is part of the
> > page table architecture.
>
> I have checked with HW architects.
>
> In DMA API mode (PASID=0), IOMMU HW does not use canonical
> addresses.
Do you really mean PASID=0 but still using a AMDv2 table with the
GCR3? That seems wild that only PASID0 would break the normal rules
for x86 page tables...
We already know AMDv1 is different and that is documented, and it only
works on PASID0.
> It's safe to use bit 56 (5 level page table) -OR- bit 47 (4 level
> page table) for address translation (we don't need sign
> extension).
But does it validate that the upper bits are zero or does it ignore
them? As I mentioned previously ignoring them breaks ATS.
> However when PASID is *enabled* (PASID != 0), then IOMMU
> expects canonical address bit[63-57] should match bit[56]. Otherwise
> it will abort the request.
Okay that's great at least.
But this is a pain.. Since iommu_domains don't act differently
depending on what PASID they are linked to we have to use the least
common denominator, meaning we should disable use of the top bit
entirely, and disable use of sign extension.
> I have requested spec writer to add details in the spec.
Yes please, this special behavior for PASID0 is very shocking.
Jason
next prev parent reply other threads:[~2025-05-28 11:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-17 16:21 [PATCH rc] iommu/amd: Fix geometry.aperture_end for V2 tables Jason Gunthorpe
2025-04-24 7:56 ` Vasant Hegde
2025-04-24 14:06 ` Jason Gunthorpe
2025-04-29 6:03 ` Vasant Hegde
2025-05-28 8:47 ` Vasant Hegde
2025-05-28 11:57 ` Jason Gunthorpe [this message]
2025-06-12 4:57 ` Vasant Hegde
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=20250528115708.GQ61950@nvidia.com \
--to=jgg@nvidia.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=jroedel@suse.de \
--cc=jsnitsel@redhat.com \
--cc=patches@lists.linux.dev \
--cc=robin.murphy@arm.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=vasant.hegde@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 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.