From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.69 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796172017; b=bLZEV4SEiy6xiEkyMkIHmH6Gnsd/pV5pzzmSFdTcZuTXEcSiV4GIuGhIVke1RzjINaEh YZfZDUOHlsPPUbVHjexxFuHV5d7HnfylvG/hvorOnQ8TpSk7m4cPJx10v0smNw3Hs/1F+ o5aXIYP1mjt2HHhWRbI7Lu0OY9d0CP1hB2tb7YFQaceKh2zvy3GBXC5TsdnVsuswl/OZU fOBJNgK6TH+o0zvHYFmbbl2WkD2Aj8+Hs/wpkmNKqsAZxTtNUKpycCZZWLZ8J7g9zuo34 mLl/obnDQP5aTMWOndHzAnHYPS/GlQaLYHMoma+TiC7oZ8YnqO7C+7k7OKPhexTjnxg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796172017; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:Date:In-Reply-To: Mime-Version:References:X-Mailer:Message-ID:Subject:From:To:Cc: Content-Type; bh=gV0ErH47JMVAUoyOXW2KasbBP4XQW8ygosCm9+p87kk=; b=ULcgSyaof9LednitMmdDqZ1NST+eZKBgEXWfUD4uPIWetjI8+Lb0/87m8gUgZNghTAGL RD6hVwqodCA2DaQ6E1bHEHr10K/PJ+8fsdAcRA0kszIecBNZHogQSf7jXVEZI2T+jiBAc ZGz0S2KvsXr81CfAcJr7nNNpxi8SZ1pCKhSEt4mGt9aZkWv3UvZ9Qd5sX9mvUNhZ5t/Id guZOwK2dqWRm//ZAD94XYqREOv0azrC4J+voLu67GGdi9cEMx2jy7qyhx08skEf7vST/j wSsz15Ad2WsXmlLKRQLoOgvd6yRrQ6G4EgZL4wP2aFqpO7YVKN2zReq4XI0lsEvyE1A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=flex--dmatlack.bounces.google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=g5LsVI8i; arc=none smtp.remote-ip=209.85.210.69 Received: from mail-ot1-f69.google.com (mail-ot1-f69.google.com [209.85.210.69]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB782606A6B4 for ; Wed, 2 Dec 2026 00:40:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AB782606A6B4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--dmatlack.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=g5LsVI8i Received: by mail-ot1-f69.google.com with SMTP id 46e09a7af769-86313f7f4faso13040925a34.1 for ; Tue, 01 Dec 2026 16:40:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796172016; x=1796776816; darn=vger.kernel.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=gV0ErH47JMVAUoyOXW2KasbBP4XQW8ygosCm9+p87kk=; b=g5LsVI8ihXP1HzcVScpRAmyj5Oz9e977Ju9ZIsXpZskvNqVQjMvzx3MERFJAS3AZkc so862C1DL9SFOGF4scxRobQuXDvxg9V+WR413+OmptnUXgWrXJ2tS5yxUVge0l889j+/ LhxE/kxjIFIrRIyBAjX/184LnTztY3iXEkYs0JWBna5IAlQCRdapuy/yNIu4lpS9Pa+i PMsDgZJAfFu082OatDb3+bwnnwywQDt10ICZFkBYMs/WFbdnYXaqbBECHx4pgG+hweep XkGjfxq8XCSGrsMeA0Qe0opceyUl9A7R0ldHReYSMVOTYRJAtPEAtuaJpD94RwbaYEcV 7sFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796172016; x=1796776816; 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=gV0ErH47JMVAUoyOXW2KasbBP4XQW8ygosCm9+p87kk=; b=VaGjh8BVSntQW2bZPltc414IOYLURG0EYscbAH70vQUG5paBT2GMui07XupoW5rt57 BnMjJeZeAoPU4S2H++O0f3sSbDKO7BZdbJigNUqj+N7sMuvYQGUiAg78aDhGrW+NRQ9b vrEgB8SKXUl51npoUT5Q5nIu5itOIceyqRxFs3zyGT3zmDOXer7MenGq4EjSPTmxSgOx HFS//BCO+K00TKF0wgkDMDcXPSSgcaWqBEfXNTERaDBn9svO5HJBiuisA13v9TXIr/9d NSngscN1DIxTDz73g8Rt/RXyWb2LGDb3Sl06ceWmVuJljwHYIITrzjTmPetqLW+xdVez R4Hg== X-Forwarded-Encrypted: i=1; AL+hErGXDXmp98mZU8WFmPlHbkWS7K8IwjOdBDCEuNJY334OnJToTNvg1GssqhQVDtrL4FtXFLd/IDEp8EZMo5M=@vger.kernel.org X-Gm-Message-State: APuU4Z//io6H7Uasic2zN/wCDN+xcRSIQBVp8R2C3G2HObI2koxX/nTi 6AU0hBOe41AX7k7gh+Q+QWFvAsMDxSWaE00FlANRPJH2aScfZ3B5dDeMJ9ZRqDrYGJac8TysXaM fgVxYw5bIPZsOyg== X-Received: from jaaq28.prod.google.com ([2002:a05:6638:c01c:b0:61d:1a3b:cb30]) (user=dmatlack job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6808:308a:b0:4fc:3dc7:66af with SMTP id 5614622812f47-57a0a516e96mr45097205b6e.10.1796172015663; Tue, 01 Dec 2026 16:40:15 -0800 (PST) Date: Wed, 2 Dec 2026 00:39:52 +0000 In-Reply-To: <20261202003955.3607156-1-dmatlack@google.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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-16-dmatlack@google.com> Subject: [PATCH 15/18] selftests/liveupdate: pci: Test bus numbers with pci=assign-busses 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 Content-Type: text/plain; charset="UTF-8" Add a PCI Live Update test that boots the next kernel with pci=assign-busses, which makes x86 assign all bus numbers itself rather than keep the ones it finds. The next kernel must still keep the bus numbers of the bridges above a preserved endpoint, which the test checks with the switch topology. pci=assign-busses only exists on x86. On arm64 and riscv64, the generic host bridge driver used by QEMU's virt machine reassigns all bus numbers anyway, so every test there already covers this, and the test is skipped. Signed-off-by: David Matlack --- .../liveupdate/pci/assign_busses.vmtest.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tools/testing/selftests/liveupdate/pci/assign_busses.vmtest.sh diff --git a/tools/testing/selftests/liveupdate/pci/assign_busses.vmtest.sh b/tools/testing/selftests/liveupdate/pci/assign_busses.vmtest.sh new file mode 100644 index 000000000000..f02b1914baf2 --- /dev/null +++ b/tools/testing/selftests/liveupdate/pci/assign_busses.vmtest.sh @@ -0,0 +1,16 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Ask the next kernel to assign all bus numbers itself, which it must not do for +# bridges above a preserved endpoint. +# +# On arm64 and riscv64, the generic host bridge driver used by QEMU's virt +# machine reassigns all bus numbers anyway, so every test there covers this. + +source "$test_dir/pci/pci_vmtest_lib.sh" + +if [[ "$arch" != "x86" ]]; then + skip "pci=assign-busses is only supported on x86" +fi + +pci_topology_switch +TEST_CMDLINE_STAGE2="pci=assign-busses" -- 2.56.1.911.g883d8bcb20-goog