Re: [PATCH] iommu/vt-d: Fix panic accessing amd_iommu_enable_faulting

From: Vasant Hegde
Date: Thu May 30 2024 - 11:18:22 EST


Hi Dimitri,


On 5/30/2024 6:27 PM, Dimitri Sivanich wrote:
> This fixes a bug introduced by commit d74169ceb0d2 ("iommu/vt-d: Allocate
> DMAR fault interrupts locally"). The panic happens when
> amd_iommu_enable_faulting is called from CPUHP_AP_ONLINE_DYN context.

Issue is happening on AMD system. Can you please change subject line. s/vt-d/amd/ ?

Also may be add "Fixes" tag as well.

-Vasant


>
> Signed-off-by: Dimitri Sivanich <sivanich@xxxxxxx>
> Tested-by: Yi Zhang <yi.zhang@xxxxxxxxxx>
> ---
> drivers/iommu/amd/init.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c
> index a18e74878f68..b02b959d12af 100644
> --- a/drivers/iommu/amd/init.c
> +++ b/drivers/iommu/amd/init.c
> @@ -3353,7 +3353,7 @@ int amd_iommu_reenable(int mode)
> return 0;
> }
>
> -int __init amd_iommu_enable_faulting(unsigned int cpu)
> +int amd_iommu_enable_faulting(unsigned int cpu)
> {
> /* We enable MSI later when PCI is initialized */
> return 0;