public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Respect VASIZE for address limits
@ 2026-03-09 14:05 Ankit Soni
  2026-03-09 14:05 ` [PATCH v3 1/2] iommu/amd: Remove PT_FEAT_DYNAMIC_TOP from PT_FORCE_ENABLED_FEATURES Ankit Soni
  2026-03-09 14:05 ` [PATCH v3 2/2] iommu/amd: Adhere to IVINFO[VASIZE] for address limits Ankit Soni
  0 siblings, 2 replies; 10+ messages in thread
From: Ankit Soni @ 2026-03-09 14:05 UTC (permalink / raw)
  To: iommu
  Cc: vasant.hegde, suravee.suthikulpanit, joro, will, robin.murphy,
	linux-kernel

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.

Patch 1 removes PT_FEAT_DYNAMIC_TOP from PT_FORCE_ENABLED_FEATURES
to fix a spurious domain allocation failure when the VA size is small
enough that dynamic top growth is unnecessary.

Patch 2 makes the driver respect IVINFO[VASIZE] when determining the
addressable VA range.

Changes:
v3: - Remove specific value checking for vasize.
    - Add patch for PT_FORCE_ENABLED_FEATURES.

v2: - Mark ivinfo_vasize_bits() as __init.

Ankit Soni (2):
  iommu/amd: Remove PT_FEAT_DYNAMIC_TOP from PT_FORCE_ENABLED_FEATURES
  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/iommu_amdv1.c |  2 +-
 5 files changed, 13 insertions(+), 8 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-03-12 14:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-09 14:05 [PATCH v3 0/2] Respect VASIZE for address limits Ankit Soni
2026-03-09 14:05 ` [PATCH v3 1/2] iommu/amd: Remove PT_FEAT_DYNAMIC_TOP from PT_FORCE_ENABLED_FEATURES Ankit Soni
2026-03-11 16:24   ` Vasant Hegde
2026-03-11 16:44     ` Jason Gunthorpe
2026-03-12  4:10       ` Ankit Soni
2026-03-12 11:22         ` Jason Gunthorpe
2026-03-12 14:42           ` Ankit Soni
2026-03-09 14:05 ` [PATCH v3 2/2] iommu/amd: Adhere to IVINFO[VASIZE] for address limits Ankit Soni
2026-03-11 16:36   ` Vasant Hegde
2026-03-12 13:45   ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox