public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iommu/amd: Fix panic accessing amd_iommu_enable_faulting
@ 2024-05-30 18:36 Dimitri Sivanich
  2024-05-30 21:05 ` Jerry Snitselaar
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Dimitri Sivanich @ 2024-05-30 18:36 UTC (permalink / raw)
  To: Yi Zhang, Tian, Kevin, Vasant Hegde, Baolu Lu, Joerg Roedel,
	Suravee Suthikulpanit, Will Deacon, Robin Murphy, David Wang,
	Shinichiro Kawasaki, Dimitri Sivanich, iommu
  Cc: linux-kernel, Steve Wahl, Russ Anderson

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.

Fixes: d74169ceb0d2 ("iommu/vt-d: Allocate DMAR fault interrupts locally")
Signed-off-by: Dimitri Sivanich <sivanich@hpe.com>
Tested-by: Yi Zhang <yi.zhang@redhat.com>
---
 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;
-- 
2.35.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] iommu/amd: Fix panic accessing amd_iommu_enable_faulting
  2024-05-30 18:36 [PATCH] iommu/amd: Fix panic accessing amd_iommu_enable_faulting Dimitri Sivanich
@ 2024-05-30 21:05 ` Jerry Snitselaar
  2024-05-31  6:11 ` Vasant Hegde
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Jerry Snitselaar @ 2024-05-30 21:05 UTC (permalink / raw)
  To: Dimitri Sivanich
  Cc: Yi Zhang, Tian, Kevin, Vasant Hegde, Baolu Lu, Joerg Roedel,
	Suravee Suthikulpanit, Will Deacon, Robin Murphy, David Wang,
	Shinichiro Kawasaki, iommu, linux-kernel, Steve Wahl,
	Russ Anderson

On Thu, May 30, 2024 at 01:36:03PM GMT, 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.
> 
> Fixes: d74169ceb0d2 ("iommu/vt-d: Allocate DMAR fault interrupts locally")
> Signed-off-by: Dimitri Sivanich <sivanich@hpe.com>
> Tested-by: Yi Zhang <yi.zhang@redhat.com>
> ---

Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>

>  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;
> -- 
> 2.35.3


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] iommu/amd: Fix panic accessing amd_iommu_enable_faulting
  2024-05-30 18:36 [PATCH] iommu/amd: Fix panic accessing amd_iommu_enable_faulting Dimitri Sivanich
  2024-05-30 21:05 ` Jerry Snitselaar
@ 2024-05-31  6:11 ` Vasant Hegde
  2024-06-07 17:56 ` Jerry Snitselaar
  2024-06-13  9:16 ` Joerg Roedel
  3 siblings, 0 replies; 5+ messages in thread
From: Vasant Hegde @ 2024-05-31  6:11 UTC (permalink / raw)
  To: Dimitri Sivanich, Yi Zhang, Tian, Kevin, Baolu Lu, Joerg Roedel,
	Suravee Suthikulpanit, Will Deacon, Robin Murphy, David Wang,
	Shinichiro Kawasaki, iommu
  Cc: linux-kernel, Steve Wahl, Russ Anderson



On 5/31/2024 12:06 AM, 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.
> 
> Fixes: d74169ceb0d2 ("iommu/vt-d: Allocate DMAR fault interrupts locally")
> Signed-off-by: Dimitri Sivanich <sivanich@hpe.com>
> Tested-by: Yi Zhang <yi.zhang@redhat.com>

Reviewed-by: Vasant Hegde <vasant.hegde@amd.com>

-Vasant

> ---
>  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;

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] iommu/amd: Fix panic accessing amd_iommu_enable_faulting
  2024-05-30 18:36 [PATCH] iommu/amd: Fix panic accessing amd_iommu_enable_faulting Dimitri Sivanich
  2024-05-30 21:05 ` Jerry Snitselaar
  2024-05-31  6:11 ` Vasant Hegde
@ 2024-06-07 17:56 ` Jerry Snitselaar
  2024-06-13  9:16 ` Joerg Roedel
  3 siblings, 0 replies; 5+ messages in thread
From: Jerry Snitselaar @ 2024-06-07 17:56 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: Yi Zhang, Tian, Kevin, Vasant Hegde, Baolu Lu, Dimitri Sivanich,
	Suravee Suthikulpanit, Will Deacon, Robin Murphy, David Wang,
	Shinichiro Kawasaki, iommu, linux-kernel, Steve Wahl,
	Russ Anderson

On Thu, May 30, 2024 at 01:36:03PM GMT, 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.
> 
> Fixes: d74169ceb0d2 ("iommu/vt-d: Allocate DMAR fault interrupts locally")
> Signed-off-by: Dimitri Sivanich <sivanich@hpe.com>
> Tested-by: Yi Zhang <yi.zhang@redhat.com>
> ---
>  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;
> -- 
> 2.35.3

Joerg,

Can this get pulled in for the next batch of fixes?

Regards,
Jerry


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] iommu/amd: Fix panic accessing amd_iommu_enable_faulting
  2024-05-30 18:36 [PATCH] iommu/amd: Fix panic accessing amd_iommu_enable_faulting Dimitri Sivanich
                   ` (2 preceding siblings ...)
  2024-06-07 17:56 ` Jerry Snitselaar
@ 2024-06-13  9:16 ` Joerg Roedel
  3 siblings, 0 replies; 5+ messages in thread
From: Joerg Roedel @ 2024-06-13  9:16 UTC (permalink / raw)
  To: Dimitri Sivanich
  Cc: Yi Zhang, Tian, Kevin, Vasant Hegde, Baolu Lu,
	Suravee Suthikulpanit, Will Deacon, Robin Murphy, David Wang,
	Shinichiro Kawasaki, iommu, linux-kernel, Steve Wahl,
	Russ Anderson

On Thu, May 30, 2024 at 01:36:03PM -0500, 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.
> 
> Fixes: d74169ceb0d2 ("iommu/vt-d: Allocate DMAR fault interrupts locally")
> Signed-off-by: Dimitri Sivanich <sivanich@hpe.com>
> Tested-by: Yi Zhang <yi.zhang@redhat.com>
> ---
>  drivers/iommu/amd/init.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to iommu/fixes, thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-06-13  9:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-30 18:36 [PATCH] iommu/amd: Fix panic accessing amd_iommu_enable_faulting Dimitri Sivanich
2024-05-30 21:05 ` Jerry Snitselaar
2024-05-31  6:11 ` Vasant Hegde
2024-06-07 17:56 ` Jerry Snitselaar
2024-06-13  9:16 ` Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox