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=2MYXmG59xod50FtBtQ27YSl3kdsJzaQm0nOPFi1uF5b8b6+YQdOypgMR/b1hwzClSUGb 7EjyDDx+yTe/ZKdBk6YhBsxVP5zphlj0+W7t9vXHneuAfHgVXldbBh/YSen7Go17vRuAH V87/Amxaw8ABHOTLkh+KcU0+V26mfxGacWlRVDoZjbmJUPgvcHsvUJjqMynuZW7BFs9VG 2i81rjtPUDK7vh6YSs2ElwyJ9IlkeOgNKasaFXoxWcQdvtOpJuOdhJv/VEYaNBXVzzKcV QCNecrcd8p6pQNYRdnL7yh3j36Stm9dQU0yZKvyhuHg5v1kqYx7fn0NbAYmtDQGpfIA== 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=au/6V41SU2titqYAD7cIX/EyfUCYGJtqZOp3uszjfgGobLxlLuo1IeTMY9Qjlydnw4N3 13Ex8Vfq2aa+7xsT+yj+LKUBK+e77Fx7VmxU6HLSInIzJ2eoxQ4s/bx2mFIi+mekI1Iz7 dqti76a6pWktBcw1g2RKWHXLvGMdzwL+4Pk2NQcQWFEhpLYgGhtpt/el2N9W5h3C1mHq0 KfjJyFsaVg2yPegrXbZ/rqrk858j0Oe2ei8F6Q/nxlFzFvRX0F3V3Uej6f5rqTKRi07qD TyOf84k/RQf8lv9MEs6Fwscy+Dl30VvtOAx/tMxUN7e6vfI7SAW3gLaeEL7g+Hl9ztA== 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 C9BE360A5BE1 for ; Wed, 2 Dec 2026 00:40:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C9BE360A5BE1 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-8628955a085so12135298a34.3 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=CosSAN1iwxuippCxLpCq8WU4HHyZMlDzxj1hvH1vtR13Shu0qE9vbHPeazlujibY3N keZlkuAZw+kbCwvV2oZNRtLt5nFzn2K/veZPiHIzN/npp9mLP8uYlevjwBe2zbFvy6Go TdcQRz5BXznhx4Kt5jwLJ2LyEkMx9mSlSKXSH43eepBsMsdSLMtwcs67Vr4dgWBK87AX AhAgwJWychBE6ZjsomvgDSweatOXCMJVExKyFH31fJD9WOHQ3bSVTvvJUEMSFcQrCxvR jVtVyxdowktIs3fTsPo/yh/+qdyLVutLmyQtoKT6zgS2lmmOZEhvAxmX/USEHyf2Asin U63Q== X-Forwarded-Encrypted: i=1; AL+hErEM0Gh3ZDR2QQs3nrqFLYPdaovasPrEUNHs/Sy6Im9/aK268/WSMA56mz5QDEe4WW6wMOJtCeuV3B0=@vger.kernel.org X-Gm-Message-State: APuU4Z+aZiN6bruaYelyTQkqRejjxLsUBIZ/I8gbBydT/Wm+/oLboKB2 5E/QkrXSotpo3cnDog6q3TLiVLGFnUf5UNgvI036A+46+JdyIKWfwObMIMIuPYu9Ei3uT0/ebto 7d9vL30l+6S7d3w== 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-pci@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