From nobody Thu Sep 10 05:48:09 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 4hgRY66pN9z6rQGl for ; Thu, 10 Sep 2026 05:48:10 +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 4hgRY6542Cz4lTM for ; Thu, 10 Sep 2026 05:48:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789019290; 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=tTwkQzHGhaSVT0oOnzLi4kNS7SsVwjwrb6qQ3lPklhs=; b=iRo+gbpuYwEeNeClYGygKwFyj3QTX0fUBU+LOZ92JwHVMsGWrlYqBTtJzq8oq8wf02YzMT bmvY1tMXvmKh9jYdGpxQKCilm2GXDUtnpSP/CjCTj8kvMSTfdK0l/oX1kogMRcWq6V82g5 nNDog8C/uf5Gox04KiBhxRymQdn/18hc9hiCTaoS0BBjdaUruaNj/Q63mL7pXIda5r8Eyt aZK8DsUwOJWEUYNoIM3vh/zrPrzTMUYWbkoTwzQU95yP/zvPIDMAsSp0lijkqH9uFnA992 zpCUlv5zJVygm7eIhjp+ozzX6okwwHf84z0zK5wMeK3Rhkq1NmRNpPpKVXGoCw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789019290; b=h3Y7Vxa7vWenznOBDuu7q2Vm0zkks96ynRo+BdBnDCYpNglQhugIxUKfwWYepW6yCfiCDk U7a8bjryzpQacQcjsmXSFBAQfB7mXJZDHS24uyS7cAfoC3jDzdpCTvfBFvJdzgJ4BsGz7u KgZiSenuRRIvYDPgq0Bv2N/xFNAe5Q0jXVzQ8679V6jEa6WUgmNv20Ex7lKom1yVABIjxm 6JaVT46IwC21AsfIZHe6jBRW6Atj8YODHnSznQNsqLhjQ0hh5rt84eD5nqoI/LzevxZ48G HX46LRLuWs98ge/cW1LXK23bmf0HJ2uV0Aat461qHV3+yyPc0zqOXLTjmhgq6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789019290; 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=tTwkQzHGhaSVT0oOnzLi4kNS7SsVwjwrb6qQ3lPklhs=; b=hylFrDDKsdssWIAwbLZAnm0HtkYmIGa4SPzlJo1Kz+EyMNy8Iz3DG0bmGIiKhgkX0Krh1x NHD5Y2NUFdnqFJ05kTaqlLJB012LRGjXoxRp0+w1jsYbBNGKPhkdwNj5TZzCzv4rrdgEn4 uyDM4Nuzqr5eEhH3Cdnd4UOp0c/FoummqpTwV2Ur8r0pHBEjuMPIYbTYtP5f5OlP0NLd0+ +TwOa8B5D+lYLHLiU5NeregOFtplS24wdYNy2gzaidqkNYJ2gF+NCkfJyjcOgY67JilsGr tq57B7wefsxGM6is7i5N5HbhW2XeGBYxw9JzBWXfCdkppmHjAsKOcSDTeS0bLg== 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 4hgRY54dgFz1S4W for ; Thu, 10 Sep 2026 05:48:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d0c4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 10 Sep 2026 05:48:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 2dac6502f8b8 - stable/15 - 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/15 X-Git-Reftype: branch X-Git-Commit: 2dac6502f8b8728762f9a94d948a534d08fd40a3 Auto-Submitted: auto-generated Date: Thu, 10 Sep 2026 05:48:09 +0000 Message-Id: <6aa24499.3d0c4.241046c4@gitrepo.freebsd.org> The branch stable/15 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=2dac6502f8b8728762f9a94d948a534d08fd40a3 commit 2dac6502f8b8728762f9a94d948a534d08fd40a3 Author: Kevin Bowling AuthorDate: 2026-08-21 02:27:49 +0000 Commit: Kevin Bowling CommitDate: 2026-09-10 04:04:42 +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 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;