diff options
| author | Jason Gunthorpe <jgg@nvidia.com> | 2025-11-27 19:54:08 -0400 |
|---|---|---|
| committer | Joerg Roedel <joerg.roedel@amd.com> | 2025-11-28 08:43:55 +0100 |
| commit | 1eb0ae6fbd544619c50b4a4d96ccb4676cac03cb (patch) | |
| tree | 43bae54d7fee3fa9d047271cec63a9ce14f1c5ca /include | |
| parent | d856f9d27885c499d96ab7fe506083346ccf145d (diff) | |
iommupt/vtd: Support mgaw's less than a 4 level walk for first stage
If the IOVA is limited to less than 48 the page table will be constructed
with a 3 level configuration which is unsupported by hardware.
Like the second stage the caller needs to pass in both the top_level an
the vasz to specify a table that has more levels than required to hold the
IOVA range.
Fixes: 6cbc09b7719e ("iommu/vt-d: Restore previous domain::aperture_end calculation")
Reported-by: Calvin Owens <calvin@wbinvd.org>
Closes: https://lore.kernel.org/r/8f257d2651eb8a4358fcbd47b0145002e5f1d638.1764237717.git.calvin@wbinvd.org
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Tested-by: Calvin Owens <calvin@wbinvd.org>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/generic_pt/iommu.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/generic_pt/iommu.h b/include/linux/generic_pt/iommu.h index c134132ed10f..9eefbb74efd0 100644 --- a/include/linux/generic_pt/iommu.h +++ b/include/linux/generic_pt/iommu.h @@ -277,6 +277,8 @@ IOMMU_FORMAT(vtdss, vtdss_pt); struct pt_iommu_x86_64_cfg { struct pt_iommu_cfg common; + /* 4 is a 57 bit 5 level table */ + unsigned int top_level; }; struct pt_iommu_x86_64_hw_info { |
