On 11/18/2025 3:47 PM, Tian, Kevin wrote:
From: Baolu Lu <[email protected]>
Sent: Tuesday, November 18, 2025 2:24 PM

On 11/18/25 12:04, Tian, Kevin wrote:
46 bits is not particularly big... Hmm, I wonder if we have some issue
with the sign-extend? iommupt does that properly and IIRC the old code
did not. Which of the page table formats is this using second stage or
first stage?
Assume it's first stage for kernel IOVA, if available in hw

It's the first stage (x86_64 fmt) according to the PASID entry setup:

IOMMU dmar0: Root Table Address: 0x105a82000
B.D.F   Root_entry                              Context_entry
                PASID   PASID_table_entry
00:02.0 0x0000000000000000:0x0000000105a85001
0x0000000000000000:0x0000000105a84405   0
0x0000000105a86000:0x0000000000000002:0x0000000000000049


so the 3rd experiment (if the former two doesn't show difference) is
to force using second stage to see whether it's caused by the
sign-extend logic.

I hardcoded the driver to always use the second stage for paging domain
translation, and it works now.

IOMMU dmar0: Root Table Address: 0x1049b6000
B.D.F   Root_entry                              Context_entry                   
        PASID   PASID_table_entry
00:02.0 0x0000000000000000:0x00000001049ba001 0x0000000000000000:0x00000001049b9405 0 0x0000000000000000:0x0000000000000002:0x00000001049bb089

Thanks,
baolu

Reply via email to