Re: [PATCH v1 1/3] iommu/amd: Prevent SB IOAPIC from overriding IVRS validation errors
From: Vasant Hegde
Date: Fri May 29 2026 - 00:13:48 EST
On 4/6/2026 9:10 PM, Wei Wang wrote:
> The check_ioapic_information() function validates IOAPICs against the
> IVRS table to safely disable Interrupt Remapping (IR) if the BIOS provides
> a broken topology.
>
> Currently, the validation loop contains a bug: If an unmapped secondary
> IOAPIC is encountered, 'ret' is set to false. But if the Southbridge (SB)
> IOAPIC is enumerated after it in the MADT, the loop overwrites 'ret' to
> true.
>
> This bypasses the validation failure and leaves IR enabled. When devices
> attached to the unmapped secondary IOAPIC fire interrupts, the IOMMU drops
> them due to the missing Requestor ID, leading to localized device hangs.
>
> Fix this by initializing 'ret' to true and only toggling it to false
> upon encountering a validation error, ensuring failures are never erased.
>
> Fixes: c2ff5cf5294b ("iommu/amd: Work around wrong IOAPIC device-id in IVRS table")
> Signed-off-by: Wei Wang <wei.w.wang@xxxxxxxxxxx>
Thanks for the fix.
Reviewed-by: Vasant Hegde <vasant.hegde@xxxxxxx>
-Vasant