Re: [PATCH v4 15/16] iommu/amd: Refactor logic to program the host page table in DTE
From: Suthikulpanit, Suravee
Date: Wed Nov 12 2025 - 13:41:01 EST
On 11/9/2025 6:03 AM, Jason Gunthorpe wrote:
On Sat, Nov 08, 2025 at 10:56:38PM +0530, Vasant Hegde wrote:
On 10/23/2025 6:38 PM, Jason Gunthorpe wrote:On Tue, Oct 21, 2025 at 01:43:23AM +0000, Suravee Suthikulpanit wrote:
(though how does IDENTITY on a device with a PASID installed work?)
Probably set_dte_identity() should call set_dte_gcr3_table () and update
relevant fields.
Actually, PASID would not work with IDENTITY since it has no page table (i.e. iommu=pt means DTE[Mode]=0 and does not have host table pointer).
PASID only work with GCR3 table.
Therefore, it does not make sense for set_dte_identity() to call set_dte_gcr3_table(). Each one should be stand alone.
Thanks,
Suravee
Yeah, maybe so, though it might be best if the caller can detect it
and have it call both functions instead of trying to bury it.
There is a fair number of variations here as you have
blocked/identity, RID/PASID attach and PASID detach to all consider.
It would be nice if it worked properly, identity on RID while PASID is
in use has a strong real use case.
Jason