opnsense-src/sys/dev/pci
Colin Percival b0bbefc465 pci: Add hw.pci.intx_reroute sysctl/tunable
INTRng can leak resources when INTx interrupts are re-routed, which is
typically harmless but can be fatal when devices are (repeatedly) hot
plugged into PCI buses on INTRng systems.  Re-routing INTx interrupts
is nonetheless still necessary on some systems, and identifying whether
the re-routing should be enabled or disabled seems to be nontrivial.

Add a hw.pci.intx_reroute sysctl/tunable so systems which don't want
legacy PCI interrupt re-routing can turn it off.  This is probably not
the best fix but it's something which can be safely included in FreeBSD
14.3.

Co-Authored-by:	jhb
Reviewed by:	bz, jhb
MFC after:	3 days
Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D49849

(cherry picked from commit 2187ec93ada1c7399f2f3537920f6277bec4a0ef)
2025-04-26 12:21:03 -07:00
..
controller sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
fixup_pci.c fixup_pci: Remove unused attach DEVMETHOD 2024-11-30 21:46:05 -05:00
hostb_pci.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ignore_pci.c ignore_pci: Add a proper stub attach routine 2024-11-30 21:46:05 -05:00
isa_pci.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
pci.c pci: Add hw.pci.intx_reroute sysctl/tunable 2025-04-26 12:21:03 -07:00
pci_dw.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
pci_dw.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
pci_dw_if.m sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
pci_dw_mv.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
pci_host_generic.c pci: Make generic_pcie_read_ivar non static 2025-04-01 10:43:57 -07:00
pci_host_generic.h pci: Make generic_pcie_read_ivar non static 2025-04-01 10:43:57 -07:00
pci_host_generic_acpi.c pci_host_generic:Add pcib_request_feature on ACPI 2025-04-01 10:43:57 -07:00
pci_host_generic_acpi.h pci_host_generic:Add pcib_request_feature on ACPI 2025-04-01 10:43:57 -07:00
pci_host_generic_den0115.c sys: Use the new arm_smccc_invoke macros 2024-10-21 15:03:27 +00:00
pci_host_generic_fdt.c pci_host_generic: Enumerate resource ranges under bootverbose 2025-02-27 08:09:22 -05:00
pci_host_generic_fdt.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
pci_if.m sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
pci_iov.c pci: Consistently use pci_vf_* for suballocated VF memory resources 2025-02-27 08:09:23 -05:00
pci_iov.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
pci_iov_if.m sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
pci_iov_private.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
pci_iov_schema.c iovctl: allow vlan restrictions to be passed to the driver 2024-07-01 18:06:05 +02:00
pci_pci.c pci: Make PCIe Eject timeout configurable 2025-04-15 20:15:00 -07:00
pci_private.h pci: Renove #ifdef PCI_IOV from declarations now used unconditionally 2025-02-27 08:09:24 -05:00
pci_subr.c sys: Set the type of allocated bus resources 2025-02-27 08:09:23 -05:00
pci_user.c pci_user.c: Cosmetic fixes 2024-12-27 10:29:23 -05:00
pcib_if.m sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
pcib_private.h pcib: Add helper routines for [de]activating PCI_RES_BUS resources 2025-02-27 08:09:19 -05:00
pcib_support.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
pcireg.h pcireg.h: Add AMD IOMMU Base Cap definitions 2024-04-12 04:18:32 +03:00
pcivar.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
schema_private.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
vga_pci.c vga_pci: Use bus_generic_* directly instead of wrappers 2024-11-30 21:46:08 -05:00