From ce9a34b1614e37dc3f8763586448063408c7bf16 Mon Sep 17 00:00:00 2001 From: Colin Percival Date: Wed, 23 Apr 2025 08:17:51 -0700 Subject: [PATCH] Turn off hw.pci.intx_reroute in EC2 Having this enabled on Graviton systems prior to Graviton 4 results in a resource leak and a kernel panic after repeated hotplug/unplug. MFC after: 3 days Sponsored by: Amazon --- release/tools/ec2.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/release/tools/ec2.conf b/release/tools/ec2.conf index 507d9acabfd..d6cb8595918 100644 --- a/release/tools/ec2.conf +++ b/release/tools/ec2.conf @@ -79,6 +79,12 @@ ec2_common() { # delay before rescanning upon device detach. echo 'debug.acpi.quirks="56"' >> ${DESTDIR}/boot/loader.conf + # The default behaviour of re-routing INTx interrupts causes a + # resource leak on INTRng (aka on Graviton systems). Repeated + # hotplug/unplug on PCI (not PCIe) Graviton systems ends up with + # a kernel panic unless we disable this. + echo 'hw.pci.intx_reroute=0' >> ${DESTDIR}/boot/loader.conf + # Load the kernel module for the Amazon "Elastic Network Adapter" echo 'if_ena_load="YES"' >> ${DESTDIR}/boot/loader.conf