From nobody Thu Sep 10 05:53:42 2026 X-Original-To: dev-commits-src-branches@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 4hgRgV4PSwz6rQtl for ; Thu, 10 Sep 2026 05:53:42 +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 4hgRgV20sMz4nmP for ; Thu, 10 Sep 2026 05:53:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789019622; 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=rr+6zdbKohTA/WR2zI7+mfa7uV+vJ3Utyg/iSEz/8L4=; b=F8h19cOjmCvpe+IVa1vbvq/27CRw/C1W8pu757twxTfep9SR6q9U9eBLh6aGi25hDdhGlp +28hSJM5dgb6XLP9CRn8xL6DXxV9866HQwNVyPrAv89Ha094/nDagTIoLcxtk5d2J8JjVW 9xxt6aJuaKKwtSXtRkQGs3lj/ZNuQt3YCsF9bnyCK+8ppWs+xVCKpD3IuJLhqTw19/Czhd bPyFgovcJk2dsKbor05OIBoC09YgjUYtwjoPJS+8O2lMI9t3LKgI3vn3HxrK+bi8OiY3yi dgwuv7gqo0gHmUNM+IAHEzZNGCVoL2OXSeXnfKrwE/rsQAJsrdEKUSwHQn9ZUw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789019622; b=KhLY8oXz2nbHdZYGugItO3cZoWOru1tBsGohizjzxSgoRWDKZe5XJ5CLw7yxxLJ8SoYFaR i1zw9OBefdC7nfy5IXSTJ0NI9gLSeNXnZ2fr+nJxRWDBdEPGgiCYYhR7PhmHNkEYQAFbH/ H+EiRWTA+EJg17gSoAjioJeLUFmZrwJ4sYoDVmJPRaYjniyXPcM1f7PScToi92c9b9hbMb mV0T5cU1LHw24VWseV9Ux0cVx9/kekDtogdvm39iGSaFtt6/MwSCuq9gXeyPy+FAy+cNaR R+QFdgRba8f2NOjFbi4aUsR5ohAHZHj9TrlCYH/zpHnHkH232LcCiw+OFNLaLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789019622; 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=rr+6zdbKohTA/WR2zI7+mfa7uV+vJ3Utyg/iSEz/8L4=; b=dK7CzGS+aV8OXJyoADu3Q3cdHbm9EjseDiTZWxpIEimXJbvkLDl2ZeSJCRUnacK58716J9 2XXTJL9L4EOhfSbMZBurHKTtNwmsy73nu4UiIhhmuIP5OGTx3OI4+wn5VPNHm14Y3oS7iX W+ncA0LONRvWAeIj0sgO0cB9Ae6SdYmJMzBQmHI+cj2b9VfFPgbdz0BSUh9fZ0cOBbIQkD +ZguZU6cD2O7JJ9VVqhNZivaMvdTIjZDRIDf6MZKUwTf7IcP+5zJVaWmf+MAFQWs7+L5nD rP2DDq88ci4W43z4VPN40y/AgM8Wa68MoZT7SXaOrLiVtT2b5PdTG9Lx5bm5pw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hgRgV0wwRzFKj for ; Thu, 10 Sep 2026 05:53:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c15e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 10 Sep 2026 05:53:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: bf94f298c998 - stable/14 - acpi_pci: Inherit PF locality for SR-IOV VFs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: bf94f298c998bc366e6c29fbbd0dd37d53a056e0 Auto-Submitted: auto-generated Date: Thu, 10 Sep 2026 05:53:42 +0000 Message-Id: <6aa245e6.3c15e.777d9e59@gitrepo.freebsd.org> The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=bf94f298c998bc366e6c29fbbd0dd37d53a056e0 commit bf94f298c998bc366e6c29fbbd0dd37d53a056e0 Author: Kevin Bowling AuthorDate: 2026-08-21 02:27:49 +0000 Commit: Kevin Bowling CommitDate: 2026-09-10 05:49:03 +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 Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D59062 (cherry picked from commit 1a2a88684a0126be8d7172362d5ec7dbb7a41c81) --- 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 acbfbe4c1dd4..431b425126e6 100644 --- a/sys/dev/acpica/acpi_pci.c +++ b/sys/dev/acpica/acpi_pci.c @@ -93,7 +93,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 */ @@ -107,7 +110,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), @@ -207,6 +210,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'. * @@ -220,6 +242,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;