From nobody Thu Aug 27 05:01:12 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4hVq9V0kMCz6qR54 for ; Thu, 27 Aug 2026 05:01:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hVq9T6ylDz3fWM for ; Thu, 27 Aug 2026 05:01:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1787806878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=boum0/UEEX56mDwpzkWNCB7DArC6CMspJ4RFZ0FUgm0=; b=b/LpqG6Pe3g9KsT5xN1L90T4cmnFapt9GJV1SPkYm8Jp0LgPj3uSNmA0Hx1PVmLmUuV0Qw HNY7vX7j5if0IqZKsENgipS4jOlYi1xY+PvxwUjLSOD3hIii0Colup3Vvz46NdHOxwoE+G beAvh0SZB7TTYjGM++xzTjNAa4wAZHgyOsLwqdWsry+BqPVPgP2OVT1FNtN3++J3Rh4HeH vMOFgO3++7gufWsCF/7aDoz4LXk0DaJ8IjUX+5gzHPBdvTHPGQzAVqhvBcvO+1sUxXfZ1I D3DrAEiVmEIg8MT9CcIDuPL+tww7zYHNam4tTOlSrOaPrjpRdiULpDxZ5PaRcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1787806878; a=rsa-sha256; cv=none; b=uNIO6QCounAEdybtyTtqIjX+7Gwg/IAYClYvhobQ4kUkrvH6fj/YnO1QFLRRqh2WBGakbe Cp72akyTGLVzX64GZeedGv0Q1v9N1caNwLNPcQ97rl2TI98CxwsFhM26X3zEmN4wcINjpa xH+UsYQs4w/OzUSwi3lnz/g1bfciWbW72azH0JviDdaHlIyXSLRfWNRlFNTTUeDOQ7XZNA NJhoStKu9rkEZ9w3cSa0ppGfBBvJOG1CytN4cYRqs4c3VNXUAoNydhEb3HHmLSARdWnE5k iXkmcTy47A0AwuZ2mLmz+7nKbxy3zcayPp9SrYIrHFDPxRcOT99rKu81QX9xpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1787806878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=boum0/UEEX56mDwpzkWNCB7DArC6CMspJ4RFZ0FUgm0=; b=osumByBfNxAHLEBg05EGvyVFkdDGFf4PDukFkNstf/AwE2Mjm7GYIuSsUClyoDqS70d2d5 uW3BkdXjimGRgQWWeg8p5AGGuwNh9WRxkoq8iTVLOqtZCEmugyp+BlXywboBsDFuti8G6K MY207h5vIQXDSSO/s2RDG2AKx1qpzw8biGDbFzBTgmODSWqql+BR1k3Zihrq8Gx6R0AQRx 3OkXjI4PxH3Ulm6oe0z1/1G86q8+loirn6pYww2vbOrEZsGMXjSLHwxvz78lzqp4kLenNg FlthQ43TN4ilnbHb31bR6xI6uUao3e5sznhEfj/Z2GnGQDZNFvvBcgisqGUtFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hVq9T3wMrz17vn for ; Thu, 27 Aug 2026 05:01:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 40a60 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Aug 2026 05:01:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 8b74806161a1 - main - acpi_pci: Do not match SR-IOV VFs to ACPI devices List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8b74806161a188103666387013cdd93fb3f5dc07 Auto-Submitted: auto-generated Date: Thu, 27 Aug 2026 05:01:12 +0000 Message-Id: <6a8fc498.40a60.23cf0510@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=8b74806161a188103666387013cdd93fb3f5dc07 commit 8b74806161a188103666387013cdd93fb3f5dc07 Author: Kevin Bowling AuthorDate: 2026-08-18 02:39:41 +0000 Commit: Kevin Bowling CommitDate: 2026-08-27 05:00:38 +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 MFC after: 2 weeks Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D59061 --- 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 1912350bbc48..0ff938cfd6b8 100644 --- a/sys/dev/acpica/acpi_pci.c +++ b/sys/dev/acpica/acpi_pci.c @@ -338,6 +338,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