Re: [PATCH v2] iommu/amd: remove obsolete domain pointer warning on release

From: Vasant Hegde

Date: Mon Nov 02 2026 - 15:24:55 EST




On 10/14/2026 3:53 AM, Kevin Mitchell wrote:
> [You don't often get email from kevmitch@xxxxxxxxxx. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> A warning is triggered in amd_iommu_release_device() on removal of a
> device with an IOMMU_RESV_DIRECT region. The warning is based on the
> false assumption that correct attachment to the release_domain will
> always result in a NULL dev_data->domain pointer. For devices with
> IOMMU_RESV_DIRECT (and consequently dev->iommu->require_direct), the
> release domain is the permanent identity_domain which sets
> itself to dev_data->domain on attach.
>
> This behaviour was added in commit e94160488e65 ("iommu: Generic support
> for RMRs during device release"). Commit c21b34762e2f ("iommu/amd: Set
> release_domain to blocked_domain") caused it to take effect for AMD
> IOMMU.
>
> Remove the warning as it is no longer strictly an error to have a non-NULL
> domain pointer. As this leaves amd_iommu_release_device() empty, remove it.
>
> The warning was observed for a device with direct mapped region:
>
> /sys/bus/pci/devices/0000:04:00.0/iommu_group/reserved_regions:
>
> 0x00000000fee00000 0x00000000feefffff msi
> 0x000000fd00000000 0x000000ffffffffff reserved
> 0x0000fffd00000000 0x0000ffffffffffff direct

Thanks. Queued for rc.

I have a patch series that adds more things in release_device ops like disabling
PASID/PRI etc. That will bring back this ops!


-Vasant