From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 20E08606A32F for ; Wed, 2 Dec 2026 00:46:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=AX7vL9DY; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=NlCYHjuW DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: References:Mime-Version:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Unsubscribe-Post:List-Owner; bh=5NJ0HrJXP8SxoEQhw3apiwBAfwq+eMH6qXMP68HQuqs=; b=AX7vL9DYF2xt3rvmHYg9SVy2LU 5c9msrn63bYDxm+fv1jMvUvPGDqmooqv6ahVXHkgf1v74YkUBdMtWhJB0GyQ057fd7h/MfF++bNjV 1u1NCg+4UA6vTT/DPhNGtprhBOyWl1WGFs6gATM/UwlZfbE6h/hvjFUoHBhj7dS5Zh28LhMejPqDl 8+FSfjZD/qKPBFgQo2CdM4ftR8eXXyUj5DpDwn+5ZTRyQG/zFgqmU09fpZIhI0etmNoK7F+zz8vi/ QiLERGtp8GiRmZoGGq9dETI9khYGr14Bzizgjto1M9PewqADjEqAQDI7ZTOja1Wi8fq/NpATfkhHq thR0+JiQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYYUU-00000009olF-3ZP4; Wed, 02 Dec 2026 00:46:34 +0000 Received: from mail-oo1-xc48.google.com ([2607:f8b0:4864:20::c48]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYYUR-00000009oil-1SX8 for linux-riscv@lists.infradead.org; Wed, 02 Dec 2026 00:46:32 +0000 Received: by mail-oo1-xc48.google.com with SMTP id 006d021491bc7-7150e6da54bso11795127eaf.1 for ; Tue, 01 Dec 2026 16:46:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796172385; x=1796777185; darn=lists.infradead.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=6ewUa3jtiGGljmZxCR8w4agPfMhxXUOYidH9JWFsA3U=; b=NlCYHjuWUwm+iFQLR0+uUM1ouw3n+JVbMnPmlsMaBAwI4YvHNNk9TM06Km5jirQGTP rHD/r9jPoY9ifolavyhJxHrTjYl/ZUfrIAB3xPnM9L+t6kRJoaUkUUZ1Vjr0hdocQxBK /Vocg3aWkDRHB6XchBNkvaa80+1+CIlTEpi1zIQVW9hdQEIMuENWNMDG5sYQp4s4AH1V f3/9nXOEJpO7BnmgngRDFyo57sgV6o8psMavnKrYXbuthnAKq4Up+f2diprr6xcz1sZ0 23E7+9yLz1rBdk8Ot71H5klgue0rG0aDYwnvuIYXMPsTVgAA1DIcAp4XshYV3T/kBVij 1GRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796172385; x=1796777185; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=6ewUa3jtiGGljmZxCR8w4agPfMhxXUOYidH9JWFsA3U=; b=k5JpCxuBZtLTwFzxI0MSwpRKu8yA6V4KM4kpgfytHOpOWkPIx3/rMJySCCPxCazW4W sZ55vvPs/28NPfINlGqiT9JyVtMwmLz/KHIyVksjvxRvO+4gS+h9k98G/Jv1i0STfy4a wYX0RL0vlmcBaz48E1qOey8HfwST0CwU1c8zIzhB2mvNJF2OAz6GSfVWKoP98gJESTMj c0jNxOwb1ECHmk0+EgPR9nvQDSIfEzkR/paYvYxZQLVpwzWdvKJP2y/8+qOaUj4A/rro Wkt+VD9bdSittSXlpOxwX0nv6P0cGqAlYHeC9jkB3jGyMJ5I1tmHcR7231j00hv9AdId fFVQ== X-Forwarded-Encrypted: i=1; AL+hErHx6jzogcJ+pg2SgZ27/FzI0KrXsDqsRCzg/spnfPkdWIdMQVCC2yJV7M6ABQB5qsf9XWDqkqBGlO+1ww==@lists.infradead.org X-Gm-Message-State: APuU4Z+lnsz6gMcTiFSdMnot1p1KiXpDENAcV2Kb2mTYbiGVI9v6INhQ b0LQaiy0YMbBAkR8JFN165rOxVJW1e60vDo9skZK8kLqpR9uMIAGrXytLYqfw23mi2taWo3nfor KbnTnTvXOa8Q/+A== X-Received: from iox15.prod.google.com ([2002:a05:6602:490f:b0:9e0:ddf2:d76c]) (user=dmatlack job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6808:1801:b0:4e8:721f:2824 with SMTP id 5614622812f47-57a0ccdfd83mr37137346b6e.60.1796172019083; Tue, 01 Dec 2026 16:40:19 -0800 (PST) Date: Wed, 2 Dec 2026 00:39:55 +0000 In-Reply-To: <20261202003955.3607156-1-dmatlack@google.com> X-Archived-By: Mime-Version: 1.0 References: <20261202003955.3607156-1-dmatlack@google.com> X-Mailer: git-send-email 2.56.1.911.g883d8bcb20-goog Message-ID: <20261202003955.3607156-19-dmatlack@google.com> Subject: [PATCH 18/18] selftests/liveupdate: pci: Test ACS with pci=config_acs From: David Matlack To: kexec@lists.infradead.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-pci@vger.kernel.org, linux-riscv@lists.infradead.org Cc: Albert Ou , Alexandre Ghiti , Alex Williamson , Bjorn Helgaas , David Matlack , Jacob Pan , Jason Gunthorpe , Josh Hilke , Lukas Wunner , Mike Rapoport , Palmer Dabbelt , Parav Pandit , Pasha Tatashin , Paul Walmsley , Pranjal Shrivastava , Pratyush Yadav , Samiullah Khawaja , Shuah Khan , Vipin Sharma X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261201_164631_418963_26CC5663 X-CRM114-Status: GOOD ( 15.08 ) X-Spam-Score: -9.5 (---------) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Add a PCI Live Update test that configures different ACS controls in each kernel with pci=config_acs=. The next kernel must keep the ACS controls of the root port above the preserved endpoint, and apply its own to the root port above the control endpoint, which the test checks with -x acs. Signed-off-by: David Matlack --- .../testing/selftests/liveupdate/pci/acs.vmtest.sh | 14 ++++++++++++++ .../selftests/liveupdate/pci/luo_pci_test.c | 10 ++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 tools/testing/selftests/liveupdate/pci/acs.vmtest.sh diff --git a/tools/testing/selftests/liveupdate/pci/acs.vmtest.sh b/tools/testing/selftests/liveupdate/pci/acs.vmtest.sh new file mode 100644 index 000000000000..6bc7f0980cbd --- /dev/null +++ b/tools/testing/selftests/liveupdate/pci/acs.vmtest.sh @@ -0,0 +1,14 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Configure different ACS controls in each kernel. The next kernel must adopt +# the ACS controls of bridges above a preserved endpoint, and apply its own to +# the root port above the control endpoint. + +source "$test_dir/pci/pci_vmtest_lib.sh" + +pci_topology_root_ports + +# Bits, from most to least significant: DT EC UF CR RR TB SV +TEST_ARGS+=(-x acs) +TEST_CMDLINE_STAGE1="pci=config_acs=xx11101@pci:0:0" +TEST_CMDLINE_STAGE2="pci=config_acs=xx00000@pci:0:0" diff --git a/tools/testing/selftests/liveupdate/pci/luo_pci_test.c b/tools/testing/selftests/liveupdate/pci/luo_pci_test.c index 4ee6f3a5f307..304f3b3ef1c9 100644 --- a/tools/testing/selftests/liveupdate/pci/luo_pci_test.c +++ b/tools/testing/selftests/liveupdate/pci/luo_pci_test.c @@ -12,8 +12,8 @@ * preserve. * -x [,...] Optional. Registers that must change across the Live * Update on bridges above the control endpoint (and not - * above the preserved endpoint): "ari" for ARI Forwarding - * Enable. + * above the preserved endpoint): "acs" for the ACS + * controls, "ari" for ARI Forwarding Enable. * -m Optional device whose config space is written to mark the * phases of the test in a QEMU trace of config writes. * @@ -546,6 +546,12 @@ static void check_devices(const char *when, const struct pci_snapshot *taken) check(!(now.command & PCI_COMMAND_MASTER), "%s: Bus Master still enabled on control device", dev->bdf); + if (dev->bridge && control_changes("acs")) { + check(dev->acs, "%s: No ACS capability", dev->bdf); + check(!dev->acs || now.acs_ctrl != dev->acs_ctrl, + "%s: ACS controls did not change (0x%04x)", + dev->bdf, now.acs_ctrl); + } if (dev->bridge && control_changes("ari")) { check(dev->pcie, "%s: Not a PCIe device", dev->bdf); check(!dev->pcie || -- 2.56.1.911.g883d8bcb20-goog _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv