From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.72 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796172017; b=d1+/pJasZopWFOTUuaRqWDZIAkjl38bblfrt4IOCJ/q9EuQM4FJjNfFCz3gvSPM2DWkt lq1FLCSaY2ZpIc7h5upk7bG8uIaTVlTbubJWTvuvf+CTd5Yxtm/JgBq6kwB6nmzsNDbTF jD+zb8Z5j2JadtoEPwvLpkBcg5CF2Xd6KbxypB68KJNlXHlCmuDOmSarVquFq3O6YkVnp ZkggV2vggVO74wXjLCIWX2OfMb1oLuhRDTk9Nrs51akBN9B5k2yo7cwINLWsymt93V+vJ fJwdU95WW/3ZNDq2y05XvHEx26eCTh8Cncci4601NiracTMRy1AEk1ocRylIKBQ4kqw== 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=F/D8w2VB33Nowv8+pgiSrdsrPu3cYC7oHgKPmaXkWW7yuO8T9YGE47N04K3ADkQb7CgP h3uXF7ATd+wGMyR0kYdGt2Y7g3HEkMDrPNT94cZ/AJwf1S7OhO/oAnRLRJxvBXpmhfw9V ToxzbWm6RrK9L4XZ0EWGjEjNcC0VrWKdxoGtgCuYD7cbWWlZMkPgGg0nTf7X8Pulh3YXv k9jVXilcX4T6PQ8PzTIGN6zKh9Gm4H9UeAe7TAqOoDf4QCrh6bqC9+9GuWRq0+b3w/4wO LjqcYusaqfsEsEo/oYRjxGeOHNegScWKjYqZjaKtH9gKLSFq0BR/L+dbseGFQHfsOvA== 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.72 Received: from mail-ot1-f72.google.com (mail-ot1-f72.google.com [209.85.210.72]) (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 C576860A5BE0 for ; Wed, 2 Dec 2026 00:40:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C576860A5BE0 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-f72.google.com with SMTP id 46e09a7af769-847e2926d94so22547654a34.0 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=15iAiyA9ctqNtuNnZtsWl1+7+l3ly+U8HdK+S9mbklDcD4Uf0R9Yp3oXIqpOK6waNv PlDUmXyuh4Tcp4chUSeY/tG/5LH4SaExfPy+MuEOW3aXX2SmzZoivup2BaNExxmaV3Pb vlykut5Na/p9q6MJxGJ5OYuABAKje8OdZKFzhVcBLtdamqdsmdEjXZoZ7u4Xe/415Q0f i4E7k+5FeulDzm8c/fL+z5ppa7VzD7BIegQXjm64so5Pv0Mb5Prd0RQWYgCoD7aAH5Gw BPUDhsO5VMJ6yyEweSxeCP2GCv5bKGci/Pkn48jCXOK2NkjjwYMNLIcE9vJb/Tzdz289 b0jg== X-Forwarded-Encrypted: i=1; AL+hErG4W3+OvGY8Ns9r0lY2FXygPI/7CqiFvPIO9+x5XIs9WWhw7fKfp0I/+QhRTdNJMhdDbbcjKsp8YFoFltpzSSw=@vger.kernel.org X-Gm-Message-State: APuU4Z+LOZCDGuwkPY5yWBB4e8R+a/Dy44o7yBjKwhmGlt2AQDEfS/vl A7QpO8SW0J7TT2AzdpdyTbvdlG9kUP0SdsJ3HATc6E4c9Twx5eKV2DlrrPZ1qCgY4+gCd7hroPM YpW3tscRdanxoOg== 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-kselftest@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