The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=197e0e35161c2c8516158d75ff3022518e74c494
commit 197e0e35161c2c8516158d75ff3022518e74c494 Author: Kevin Bowling <[email protected]> AuthorDate: 2026-08-18 02:39:41 +0000 Commit: Kevin Bowling <[email protected]> CommitDate: 2026-09-10 05:48:51 +0000 acpi_pci: Do not match SR-IOV VFs to ACPI devices SR-IOV VFs are instantiated dynamically from their PF rather than enumerated from ACPI. A VF's runtime slot and function can match an unrelated _ADR below the bridge. acpi_pci_save_handle() stores that handle in the VF's devinfo before acpi_pci_update_device() runs. If the handle is already bound to another device_t whose parent is not acpi0, acpi_pci_update_device() panics under INVARIANTS. Without INVARIANTS, the VF retains the unrelated handle, so subsequent ACPI lookups, including NUMA and power-management operations, can act on the wrong namespace node. Skip ACPI namespace matching for VFs. Reviewed by: jhb Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D59061 (cherry picked from commit 8b74806161a188103666387013cdd93fb3f5dc07) --- sys/dev/acpica/acpi_pci.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/dev/acpica/acpi_pci.c b/sys/dev/acpica/acpi_pci.c index 646295f9eecc..acbfbe4c1dd4 100644 --- a/sys/dev/acpica/acpi_pci.c +++ b/sys/dev/acpica/acpi_pci.c @@ -340,6 +340,18 @@ acpi_pci_save_handle(ACPI_HANDLE handle, UINT32 level, void *context, void acpi_pci_child_added(device_t dev, device_t child) { + struct acpi_pci_devinfo *dinfo; + + dinfo = device_get_ivars(child); + + /* + * VFs are instantiated dynamically from their PF rather than enumerated + * from ACPI. A VF's runtime slot and function can match an unrelated + * _ADR below the bridge, causing the ACPI handle for that device to be + * attached to the VF. + */ + if ((dinfo->ap_dinfo.cfg.flags & PCICFG_VF) != 0) + return; /* * PCI devices are added via the bus scan in the normal PCI
