From nobody Thu Aug 27 05:01:12 2026 X-Original-To: dev-commits-src-all@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 4hVq9N72Dqz6qQmR for ; Thu, 27 Aug 2026 05:01:12 +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 4hVq9N5cCkz3f4k for ; Thu, 27 Aug 2026 05:01:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1787806872; 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=dcL9Teu0ldZCPm5LJAQwNV36mKn8pe9lyAqh/aNHGHErT70a0L1MSVFlMNNiOP0Ldx8Vub m1VOsoB8yRtvGWVOavXYkN0AN9nnO2vIVY7tUECCFIHxFA01p9OpNPwxiXaY2NcStMxn3E DPSJVg/xUU8ymTlAyXBMjoDbCwI6WfYnmgJs8S76T44jVchLrqiYIe6+nKBGhIy5gx+wxu 7MBAezUlqqgUgWOlvvYsJFX9TV0oc6f3bCBD7CT1+xodeQLT8dNSUrAvEOeDHP9h4w+cE+ 802itL0PH5DvzHbNHicbJkxgS5nApn3qw11jiSdSTuRG7q1TnGVLLxiGKH27pg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1787806872; a=rsa-sha256; cv=none; b=BruSx28BZUk/mQMX6+jqWdqAznUtt6Fj/kA6ZXMVecsQwZcXzwyj+vKDFIZ9BYc2HXvfOX Ws9K2OG+lRklusZFfLx1g6nrXOgsGALd/TiTHuPhGmDuU8miCdYzgx3iD81kHMz1n1M8ed MedHT8gctokMJW+1vMlwOJqEMgAzHe1wV1RKmyp78nxWoBzxX1TbqdrjI/DCBKfBXDe5KJ z1TMyCh6+nv4UyZ/QZ6T5msdnjQcQgWna9agLjJ4yz17uGBnCrLt/hr9TlJwLtIMrzxN3m cWqAh3UmEycNGiHoB5mav5pAe1y/QjL9LTSao9ouLNIB0VXVpffwdVpBRjieCg== 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=1787806872; 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=GB5PAoyDQ8s8Oi5ZF6FsUCkrmq7E50CtdofpRTEDL5HSPj/Wbb2921BU7JjOYRBibVRMAv An6dswUYIvlpkSCE96HQ4Rv8rJfrPuYLvsm2vJXHrsPaTKW5fz+SL9Qs6H5DKKkoErRJ9N lRKIOvJI5YOrxpnYTwf/LfW60n7vRO/9qnelyBS/fxhJMFgxxVd/SnmclO+MhmRsHdA+Md C7cgET8VEV1gq9CrNbZUN8M4fHrUgpfdkluGcmv3lRx9q1tD2XqP8+7W+i/ZjQvSaUCeER TbXwUMd4gEiFUYSYvbsru0G+iCDyrAcdmbpPmxbUP2eLCnpNjVV/3Za7BKyRhw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hVq9N4F1Kz18Hq for ; Thu, 27 Aug 2026 05:01:12 +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 all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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