mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Adam Pelka <adampelka26@gmail.com>
To: suravee.suthikulpanit@amd.com
Cc: frank.gorishek@amd.com, iommu@lists.linux.dev, jon.grimm@amd.com,
	joro@8bytes.org, linux-kernel@vger.kernel.org,
	santosh.shukla@amd.com, thomas.lendacky@amd.com,
	vasant.hegde@amd.com, alex@shazbot.org
Subject: Re: [PATCH v2 0/4] iommu/amd: IVMD handling cleanup and ivmd= boot override
Date: Thu, 1 Oct 2026 01:56:09 +0100	[thread overview]
Message-ID: <3d2d6a70-8a00-4ef4-89ac-8000d9f9bf85@gmail.com> (raw)
In-Reply-To: <20260424092213.16976-1-suravee.suthikulpanit@amd.com>

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@gmail.com/

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

Tested-by: Adam Pelka <adampelka26@gmail.com>

Thanks,
Adam

      parent reply	other threads:[~2026-10-01  0:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-24  9:22 Suravee Suthikulpanit
2026-04-24  9:22 ` [PATCH v2 1/4] iommu/amd: Drop unused global exclusion range fields and init Suravee Suthikulpanit
2026-04-24  9:22 ` [PATCH v2 2/4] iommu/amd: Do not convert IVMD exclusion range to unity range Suravee Suthikulpanit
2026-05-08  7:30   ` Adrian Huang12
2026-04-24  9:22 ` [PATCH v2 3/4] iommu/amd: Clean up and simplify IVMD entry handling Suravee Suthikulpanit
2026-04-24  9:22 ` [PATCH v2 4/4] iommu/amd: Introduce boot option ivmd=seg:bus:dev.fun,start,size,flags Suravee Suthikulpanit
2026-07-20 10:01 ` [PATCH v2 0/4] iommu/amd: IVMD handling cleanup and ivmd= boot override Suthikulpanit, Suravee
2026-07-30 12:32   ` Jörg Rödel
2026-10-01  0:56 ` Adam Pelka [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3d2d6a70-8a00-4ef4-89ac-8000d9f9bf85@gmail.com \
    --to=adampelka26@gmail.com \
    --cc=alex@shazbot.org \
    --cc=frank.gorishek@amd.com \
    --cc=iommu@lists.linux.dev \
    --cc=jon.grimm@amd.com \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=santosh.shukla@amd.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=thomas.lendacky@amd.com \
    --cc=vasant.hegde@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®