From nobody Thu Aug 27 05:02:29 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 4hVqBy54qjz6qQqv for ; Thu, 27 Aug 2026 05:02:34 +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 4hVqBy4GK1z3g0L for ; Thu, 27 Aug 2026 05:02:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1787806954; 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=RLDi6O6NxhFL0WgqU2jKeIQqST4D+Fe+752Ks/gp77E=; b=YyvmUIBVAWq3eDgVNhjonLmpDD6Hiz4dI2+FcCuTtzNjEO2NdAw6EUTVKUyZmIE86PAzWA X3lKUe5MUr7e8if0NYAh4NADKEiQJR6TYIGkHLxJI8R1E9O2j8yNF1KUA84iWwyxYa8z03 SBYWw0VfdmCsG7ZFt47Tzv+KcNYoJzfzDCEacfIJcBjxAArerJfbJ6sreb2oJrfGq7MCLr 97wV/bqAji2m/1wbIpeKsWPCGiinvu+bNZ3OQ6wI7IVv9ueEqoNt4uBoRv2tXnfPMGxtdn ga6ePFM/gkNvZ2QLsGfqtMmuIkvtH3GZPZBsfnD3xsZ0DBd+dEQeLmhF2FQw/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1787806954; a=rsa-sha256; cv=none; b=ph0wojXInZj3NITMsktTanm1KFR0ImA7ahUO2whePsTixE3dX4ESVpO7ZPwQdn0RrOgoQS GgkppevqkU41bahf3vVVkzaSuM3PskLHLEfZoBEywPDg0sQJmAGieknFGzXdJ0fdsBdwcW t1rAq5JBTE72/9LyP3nOWF+H26+Cl7mS3is98nZaIY/QO0WbjzhbcycjDGTnF/MkMOHh9S 91e2nxSj1zQPk7ShuCLcpjgEsgo/8whVOcUBlncEwpsh6/nmDHsAWt69kDto+FRHg0vZF3 F00lKu5o++HuBb7Zd4ea0OXT1X5+ebx8w+FnqRXljqFdVtVz5L7Ypb+QKnfKlw== 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=1787806954; 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=RLDi6O6NxhFL0WgqU2jKeIQqST4D+Fe+752Ks/gp77E=; b=abBDvzh5Px0j2cFCzfSeMAx6jlTXKbydF65+qtuF9LgobzXAGF3lNZNgBIvsiP+jhK1po4 x8soFb1skS6GVw1f55Mvyy6rKYdLg1QmHl6ep3/QXjyish7yRcrCtvPGTDP/ABRf6eQmDS o+EwCYV+3JsS+YFmDUsYJhUCdJhkVDX4K5K/+BwqkzP4DUyd4xhDd3W+PaigD9Sn0d1nFf pICbzsgslzykdx3g5DvrgpyfNsCZGwDy/6isfHGJcRrjZ6lQZpbjBmrO/SPn3HJEZtWJs/ GIpBDspOXs8xp1eS3geFeNGiodFwTbUgVeh4QMML4V1VTTqCkw1iKIAEXIBqrg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hVqBy34LHz1805 for ; Thu, 27 Aug 2026 05:02:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fc4e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 27 Aug 2026 05:02:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 1a2a88684a01 - main - acpi_pci: Inherit PF locality for SR-IOV VFs 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: 1a2a88684a0126be8d7172362d5ec7dbb7a41c81 Auto-Submitted: auto-generated Date: Thu, 27 Aug 2026 05:02:29 +0000 Message-Id: <6a8fc4e5.3fc4e.5223cb7d@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=1a2a88684a0126be8d7172362d5ec7dbb7a41c81 commit 1a2a88684a0126be8d7172362d5ec7dbb7a41c81 Author: Kevin Bowling AuthorDate: 2026-08-21 02:27:49 +0000 Commit: Kevin Bowling CommitDate: 2026-08-27 05:01:34 +0000 acpi_pci: Inherit PF locality for SR-IOV VFs SR-IOV VFs are instantiated from their PF and intentionally do not receive an ACPI handle by matching their runtime BDF. Consequently, ACPI locality queries for a VF fall back to the upstream bus. This is usually sufficient, but loses a _PXM supplied specifically for the PF. Use the PCI core's owning-PF accessor for BUS_GET_DOMAIN and BUS_GET_CPUS requests made for a VF. This preserves the VF's lack of an ACPI handle while allowing its CPU and NUMA placement to follow the PF. Reviewed by: jhb MFC after: 2 weeks Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D59062 --- sys/dev/acpica/acpi_pci.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/sys/dev/acpica/acpi_pci.c b/sys/dev/acpica/acpi_pci.c index 0ff938cfd6b8..56ae2ce3dda4 100644 --- a/sys/dev/acpica/acpi_pci.c +++ b/sys/dev/acpica/acpi_pci.c @@ -90,7 +90,10 @@ static int acpi_pci_set_powerstate_method(device_t dev, device_t child, int state); static void acpi_pci_update_device(ACPI_HANDLE handle, device_t pci_child); static bus_dma_tag_t acpi_pci_get_dma_tag(device_t bus, device_t child); +static int acpi_pci_get_cpus(device_t dev, device_t child, + enum cpu_sets op, size_t setsize, cpuset_t *cpuset); static int acpi_pci_get_domain(device_t dev, device_t child, int *domain); +static device_t acpi_pci_get_locality_device(device_t child); static device_method_t acpi_pci_methods[] = { /* Device interface */ @@ -104,7 +107,7 @@ static device_method_t acpi_pci_methods[] = { DEVMETHOD(bus_child_deleted, acpi_pci_child_deleted), DEVMETHOD(bus_child_location, acpi_pci_child_location_method), DEVMETHOD(bus_get_device_path, acpi_pci_get_device_path), - DEVMETHOD(bus_get_cpus, acpi_get_cpus), + DEVMETHOD(bus_get_cpus, acpi_pci_get_cpus), DEVMETHOD(bus_get_dma_tag, acpi_pci_get_dma_tag), DEVMETHOD(bus_get_domain, acpi_pci_get_domain), @@ -204,6 +207,25 @@ acpi_pci_get_device_path(device_t bus, device_t child, const char *locator, stru return (pci_get_device_path_method(bus, child, locator, sb)); } +/* Use a VF's PF as the source of its ACPI locality information. */ +static device_t +acpi_pci_get_locality_device(device_t child) +{ + device_t pf; + + pf = pci_iov_get_pf(child); + return (pf != NULL ? pf : child); +} + +static int +acpi_pci_get_cpus(device_t dev, device_t child, enum cpu_sets op, + size_t setsize, cpuset_t *cpuset) +{ + + child = acpi_pci_get_locality_device(child); + return (acpi_get_cpus(dev, child, op, setsize, cpuset)); +} + /* * Fetch the NUMA domain for the given device 'dev'. * @@ -217,6 +239,7 @@ acpi_pci_get_domain(device_t dev, device_t child, int *domain) { int d; + child = acpi_pci_get_locality_device(child); d = acpi_pxm_parse(child); if (d >= 0) { *domain = d;