Respect VASIZE for address limits
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest4 patches 9 repliesIn review
- v43 patches 3 repliesSuperseded
- v32 patches 7 repliesSuperseded
Changes from the cover letter
v5: - Added Jason's suggestion for modifying get_info().
v4: - Remove PT_FEAT_DYNAMIC_TOP check from pt_init_common().
- Add test coverage in amdv1 for 32bit va size.
v3: - Remove specific value checking for vasize.
- Add patch for PT_FORCE_ENABLED_FEATURES.
v2: - Mark ivinfo_vasize_bits() as __init.
Patches in v5 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | iommu_pt: Fix pgsize_bitmap calculation in get_info for smaller vasz'sdrivers/ drivers/ | +13 | 1 reply | |
| 2/4 | iommu_pt: support small VA for AMDv1drivers/ | +0 | 2 replies | |
| 3/4 | iommu_pt: add kunit config for 32-bit VA (amdv1_cfg_1)drivers/ drivers/ | +4 | 1 reply | |
| 4/4 | iommu/amd: Adhere to IVINFO[VASIZE] for address limitsdrivers/ drivers/ drivers/ +1 more | +12 | 0 replies |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by.
| Patch | Jason Gunthorpe | Vasant Hegde |
|---|---|---|
| 1/4 | R-b | |
| 2/4 | R-b | R-b |
| 3/4 | R-b | R-b |
| 4/4 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v5 0/4] Respect VASIZE for address limits
The AMD IOMMU driver was only using EFR[HATS] to derive the VA size, ignoring the IVINFO[VASIZE] limit. This could create domains that exceed the bounds advertised by hypervisor. With this series, driver respects IVINFO[VASIZE] when determining the addressable VA range.
For a small VA size, domain initialization in the generic page table framework can fail with -EOPNOTSUPP. This happens because the page table clears the dynamic top feature from the force enabled feature set, as no page table growth is needed beyond the current level.
This series also fixes this issue and adds KUnit test coverage for the 32-bit VA configuration.
Changes:
v5: - Added Jason's suggestion for modifying get_info().
v4: - Remove PT_FEAT_DYNAMIC_TOP check from pt_init_common().
- Add test coverage in amdv1 for 32bit va size.
v3: - Remove specific value checking for vasize.
- Add patch for PT_FORCE_ENABLED_FEATURES.
v2: - Mark ivinfo_vasize_bits() as __init.
Ankit Soni (4):
iommu_pt: Fix pgsize_bitmap calculation in get_info for smaller vasz's
iommu_pt: support small VA for AMDv1
iommu_pt: add kunit config for 32-bit VA (amdv1_cfg_1) iommu/amd: Adhere to IVINFO[VASIZE] for address limits
drivers/iommu/amd/amd_iommu.h | 2 +- drivers/iommu/amd/amd_iommu_types.h | 1 + drivers/iommu/amd/init.c | 13 +++++++++---- drivers/iommu/amd/iommu.c | 3 +-- drivers/iommu/generic_pt/fmt/amdv1.h | 1 + drivers/iommu/generic_pt/iommu_pt.h | 12 ++++++------ drivers/iommu/generic_pt/kunit_generic_pt.h | 10 +++++++--- drivers/iommu/generic_pt/kunit_iommu_pt.h | 5 +++-- 8 files changed, 29 insertions(+), 18 deletions(-)
Signature · 1 line
2.43.0