Re: [PATCH v2 0/4] iommu/amd: IVMD handling cleanup and ivmd= boot override

From: Adam Pelka

Date: Wed Sep 30 2026 - 20:56:25 EST


Hi Suravee,

This series removes the IOMMU_RESV_DIRECT regions that block VFIO
passthrough on my Gigabyte B850 AORUS ELITE WIFI7 (BIOS F11, 05/21/2026;
same problem on F7), Ryzen 9 9950X3D, RTX 5080.

The IVRS table on this board has three IVMD type 0x22 entries, all with
flags 0x08 (exclusion range only, no unity/IR/IW bits), each covering
devid 0000:00:00.0 - 0000:0f:1f.7:

  IVMD 0x22 flags 0x08  0x8aa34000 len 0x1000
  IVMD 0x22 flags 0x08  0x8aa33000 len 0x1000
  IVMD 0x22 flags 0x08  0x95967000 len 0x1000

Without the series (stock 7.2.6), init_unity_map_range() converts these
to r/w unity maps, so every IOMMU group on buses 0-15 (27 groups) gets
them as IOMMU_RESV_DIRECT. The GPU's group (01:00.0 + 01:00.1) shows:

  0x000000008aa33000 0x000000008aa34fff direct
  0x0000000095967000 0x0000000095967fff direct
  0x00000000fee00000 0x00000000feefffff msi
  0x000000fd00000000 0x000000ffffffffff reserved

and VFIO assignment of the GPU failed (tested on F7) with "Firmware has
requested this device have a 1:1 IOMMU mapping, rejecting configuring
the device without a 1:1 mapping. Contact your platform vendor."

With v2 1-4 applied on top of 7.2.8 (they apply cleanly), the same
group shows:

  0x000000008aa33000 0x000000008aa34fff reserved
  0x0000000095967000 0x0000000095967fff reserved
  0x00000000fee00000 0x00000000feefffff msi
  0x000000fd00000000 0x000000ffffffffff reserved

No group on the system reports a direct region any more. The host runs
with the default DMA-FQ domain on every group except the iGPU
(identity), and there are no AMD-Vi IO_PAGE_FAULT or FW_BUG messages in
the log. The ivmd= parameter was not exercised. I have not yet assigned
the GPU to a VM, so the VFIO ownership claim itself is untested on the
patched kernel; the check above is of reserved regions only.

This matches the IVMD pattern in the amd_iommu=relax_unity report from
March [1] (Gigabyte AM5, type 0x22 over devid 0x0000-0x0fff). That
report didn't include the IVMD flags (Vasant asked for them); on this
board they are exclusion-only (0x08). If those boards are the same,
this series should fix them too without relax_unity. I can send the
raw IVRS dump if useful.

[1] https://lore.kernel.org/all/20260328213228.12084-1-chris.longros@xxxxxxxxx/

I'm happy to retest v3 when it's out.

Tested-by: Adam Pelka <adampelka26@xxxxxxxxx>

Thanks,
Adam