Skip to contentSkip to conversation

iommu/amd: Fix panic accessing amd_iommu_enable_faulting

PATCH Applied Dimitri Sivanich 4 participants 5 messages May 30, 2024 – Jun 13, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu/amd: Fix panic accessing amd_iommu_enable_faulting

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")
---
 drivers/iommu/amd/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/amd/init.c +1 -1
index a18e74878f68..b02b959d12af 100644
@@ -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;
Signature · 1 line
2.35.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Dimitri Sivanich

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")

---

Quoted 18 lines
 drivers/iommu/amd/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/amd/init.c +1 -1
index a18e74878f68..b02b959d12af 100644
@@ -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;
Signature · 1 line
2.35.3
maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Dimitri Sivanich
Quoted 7 lines · Dimitri Sivanich

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")

-Vasant

Quoted 17 lines
---
 drivers/iommu/amd/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/amd/init.c +1 -1
index a18e74878f68..b02b959d12af 100644
@@ -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;
#3 lore raw
In reply to Dimitri Sivanich
Quoted 26 lines · Dimitri Sivanich

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")
---
 drivers/iommu/amd/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/amd/init.c +1 -1
index a18e74878f68..b02b959d12af 100644
@@ -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;
Signature · 1 line
2.35.3

Joerg,

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

Regards,
Jerry

maintainer Applied
#4 lore raw
In reply to Dimitri Sivanich
Quoted 10 lines · Dimitri Sivanich

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")
---
 drivers/iommu/amd/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to iommu/fixes, thanks.