ionic: advertise 52-bit addressing limitation for MSI-X
Subsystems (3)
PATCH 1/1 ionic: advertise 52-bit addressing limitation for MSI-X
Current ionic devices only support 52 internal physical address lines. This is sufficient for x86_64 systems which have similar limitations but does not apply to all other architectures, notably IBM POWER (ppc64). To ensure that MSI/MSI-X vectors are not set outside the physical address limits of the NIC, set the recently added no_64bit_msi value of the pci_dev structure during device probe.
--- drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c +4 -0
@@ -326,6 +326,10 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) goto err_out; } +/* Ensure MSI/MSI-X interrupts lie within addressable physical memory */ +if (IONIC_ADDR_LEN <64 ) + pdev->no_64bit_msi =1 ; + err =ionic_setup_one (ionic);if (err) goto err_out;
Signature · 1 line
2.43.0
Quoted 19 lines · David Christensen
Current ionic devices only support 52 internal physical address lines. This is sufficient for
x86_64systems which have similar limitations but does not apply to all other architectures, notably IBM POWER (ppc64). To ensure that MSI/MSI-X vectors are not set outside the physical address limits of the NIC, set the recently addedno_64bit_msivalue of thepci_devstructure during device probe.Signed-off-by David Christensen <[email protected]>--- drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c +0
-0
drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) · line 332
Quoted 7 lines
drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c +4
-0@@ -326,6 +326,10 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) goto err_out; } +/* Ensure MSI/MSI-X interrupts lie within addressable physical memory */ +if (IONIC_ADDR_LEN <64 ) + pdev->no_64bit_msi =1 ; +
Thanks, David, for the reminder that we have something like this in our out-of-tree driver. I'm far from being a DMA expert, but this seems limiting for those architectures that don't need it, and I would have thought that setting the dma mask would already be the way of telling the system what our limitation was so there wouldn't be this problem. (I'm sure someone will point out the error in my thinking...)
Perhaps to solve your problem with less limitation on others we could do something like:
#ifdef CONFIG_PPC64
pdev->no_64bit_msi = 1;#endif
Thanks,
sln
Quoted 6 lines
drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c +0
-1err =ionic_setup_one (ionic);if (err) goto err_out; --2.43.0
PATCH v2 1/1 ionic: advertise 52-bit addressing limitation for MSI-X
In reply to David ChristensenCurrent ionic devices only support 52 internal physical address lines. This is sufficient for x86_64 systems which have similar limitations but does not apply to all other architectures, notably IBM POWER (ppc64). To ensure that MSI/MSI-X vectors are not set outside the physical address limits of the NIC, set the no_64bit_msi value of the pci_dev structure during device probe.
---
v2: Limit change to ppc64 systems as suggested
--- drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c +5 -0
@@ -326,6 +326,11 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) goto err_out; } +#ifdef CONFIG_PPC64 +/* Ensure MSI/MSI-X interrupts lie within addressable physical memory */ + pdev->no_64bit_msi =1 ; +#endif + err =ionic_setup_one (ionic);if (err) goto err_out;
Signature · 1 line
2.43.0
Quoted 8 lines · David Christensen
Current ionic devices only support 52 internal physical address lines. This is sufficient for
x86_64systems which have similar limitations but does not apply to all other architectures, notably IBM POWER (ppc64). To ensure that MSI/MSI-X vectors are not set outside the physical address limits of the NIC, set theno_64bit_msivalue of thepci_devstructure during device probe.
Quoted 4 lines
Signed-off-by David Christensen <[email protected]>---
v2: Limit change to ppc64 systems as suggested
---
Works for me, thanks!
Quoted 22 lines
drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c +5
-1@@ -326,6 +326,11 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) goto err_out; } +#ifdef CONFIG_PPC64 +/* Ensure MSI/MSI-X interrupts lie within addressable physical memory */ + pdev->no_64bit_msi =1 ; +#endif + err =ionic_setup_one (ionic);if (err) goto err_out; --2.43.0
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Mon, 3 Jun 2024 17:27:41 -0400 you wrote:
Current ionic devices only support 52 internal physical address lines. This is sufficient for
x86_64systems which have similar limitations but does not apply to all other architectures, notably IBM POWER (ppc64). To ensure that MSI/MSI-X vectors are not set outside the physical address limits of the NIC, set theno_64bit_msivalue of thepci_devstructure during device probe.[...]
Here is the summary with links:
- [net-next,v2] ionic: advertise 52-bit addressing limitation for MSI-X
https://git.kernel.org/netdev/net-next/c/1467713eb224
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html