Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.167.200 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796172018; b=Fe8dpFp0fqSIJEHHgpcw4jfDvElmbGLhEqUgzWJ1bn8uchXtMoAU2uS/yRuBZo025HPh 6p8m3wCf7lzRW0JDpWGra5Bm5/7d8MOkMpx9Pb/odq4eZwW35THoJb4gGEY7VKnGB7Nig 2IW6VuvNetTaVDtyd/D8DaK7j1atDShKysY2cOjBA0x4Z5WoNoIWiSLhpMi0gVolbnq0L Ym1yiaHnnpTVNyH6UNQOxbpPUCBTYGkTi41X9E/CdzPc5t0b/kbdyGY2Pvf8J6teO/JcP 8qfvPHQ71JHDxIKHqCmGRGYA9faOggcjH/DBcIKAWD7Ij+5Is84TZsPKs9a815Uc75Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796172018; 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=n8r4RxoBw4kV4HZGfICQqer1Y8C7P6dL9OSLBqmRieg=; b=V1t5rfFNFbUxksaeZr0E94sc8NHb2dykTwUQrSvAIfl/HkN64K5W+x1SZqyFA7IzFSoB lhReJgvuqDlq2Kvya6oRiVONmRiKwSlEqxr6X0ra9AmLydYihWGtoNVYndgixKOUuE5bv F8WWUoGbIESJOInQiFjc+ih/0/E2Y25uuG/zRvANOmIBJ9vy+K3GbA/4JSx1Y95yKhSgB NBvTe6bAETEEGfGTXJJIkzp6lg1fPnI+EZ2YsjE9p0FLijPpd2dSVBIyJ40ytcTNZOzi8 j4tKsC+KZaMaV1yJOFb1/IxuA3PLTwmTu8Wc6OYiayw5Iz5VGok9ERPys5SMsA7/xCQ== 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=iRb9utML; arc=none smtp.remote-ip=209.85.167.200 Received: from mail-oi1-f200.google.com (mail-oi1-f200.google.com [209.85.167.200]) (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 022B2606A323 for ; Wed, 2 Dec 2026 00:40:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 022B2606A323 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=iRb9utML Received: by mail-oi1-f200.google.com with SMTP id 5614622812f47-5713cd0fb42so14342470b6e.0 for ; Tue, 01 Dec 2026 16:40:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796172017; x=1796776817; 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=n8r4RxoBw4kV4HZGfICQqer1Y8C7P6dL9OSLBqmRieg=; b=iRb9utMLOUZWiBCoW+1rlym+epmrTjolQh/ZmjN8BSrm80boRZuhESSVdJjMhh6z0v UG7V3g8xH0YgaQaTInU09TokZAmUp7qzW+tLoqWOFYec8V6Hy5vVdi5Tm9fEfJOVnoLX H4OZ1fjPeveTAa/2NpLCM53RyAEBhKu0MxIfq6J6Hsddmq9ANLf7FmdP/wwafQTTgDHd ejjzqN3kN8jf5LbOPBzTXb5yYKDb/1lvf1VYTtrixHI+wapU6z34a+b11JjaRZqBLAYD omxyYbSXt5SBmsd3sH2RF317CN8dqKJ409TMC03zFI3jcQLF2M3+zez0KeXQr+aiGnud cewQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796172017; x=1796776817; 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=n8r4RxoBw4kV4HZGfICQqer1Y8C7P6dL9OSLBqmRieg=; b=Wnl9jHQnW9rtCK7BUnRkBqazZg2SVhjAJyvQojYKobnPbPC6Trf9UPk+M2o8NWoBNW xNP7BjF/ig0pXusAfXVrxIpIH5DIeoUWlGveLRu3D+LUMfxfKC6KKu7wEGDXeHXXh9j7 SnAF0Ceyvn1QbL/7rFA2Bu3PKZJ6GN3NsZo4RUCT6tzVZFfrSJN4kzDojdyORdkc99dL x3Zl2wm8n7Xl5T1wi/4rSqSLmn2/fTNc/uwQymPd2tbuNxKmKEfP6uThwhdpNfAQUAyi KslfrSuFSCrHddGeRK0am1CTqiOCqs7PYyUuugZg+L0wvXsijh0dvmVeiD0y4v4D89Vf 00tA== X-Forwarded-Encrypted: i=1; AL+hErFiHFqu0qHPCsmpwhrYGPYhQHN0MaGadwFnaQnhl1QXqBSqNNTC5wO11Gk+k4iqr4qCbPAT/TFFZ85EJcHTA+k=@vger.kernel.org X-Gm-Message-State: APuU4Z85OI08XjXjhx0c8EuDUNb89ZbIGSWJUpTQKhUhccL72a6Yk2tU 0gHlw7hiCb5pbSyjYEBBv06OarzwnUk9WFOoJajyyslvtUo1l1ann9IFuIZMBZH4c5vHK6a902f aAfRk/b+xx9zYdA== X-Received: from ila10-n1.prod.google.com ([2002:a05:6e02:520a:10b0:544:45eb:2ab]) (user=dmatlack job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6808:2f1b:b0:574:4cef:ddbd with SMTP id 5614622812f47-5797dc9bd45mr31218089b6e.39.1796172016825; Tue, 01 Dec 2026 16:40:16 -0800 (PST) Date: Wed, 2 Dec 2026 00:39:53 +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-17-dmatlack@google.com> Subject: [PATCH 16/18] selftests/liveupdate: pci: Test bus numbers with pci=hpbussize 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=hpbussize=16, which makes it reserve extra bus numbers below hotplug bridges, such as QEMU's PCIe ports. Reassigning bus numbers with the same settings as the first kernel produces the same numbers again, so only the trace check would catch a next kernel that fails to keep them. With hpbussize=16 the reassigned numbers differ, so the checks in the next kernel catch it too. The test uses the switch topology. On x86, also pass pci=assign-busses so that the next kernel reassigns bus numbers. The generic host bridge driver used on arm64 and riscv64 always does. Signed-off-by: David Matlack --- .../liveupdate/pci/hpbussize.vmtest.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tools/testing/selftests/liveupdate/pci/hpbussize.vmtest.sh diff --git a/tools/testing/selftests/liveupdate/pci/hpbussize.vmtest.sh b/tools/testing/selftests/liveupdate/pci/hpbussize.vmtest.sh new file mode 100644 index 000000000000..423fdbde99c1 --- /dev/null +++ b/tools/testing/selftests/liveupdate/pci/hpbussize.vmtest.sh @@ -0,0 +1,17 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Ask the next kernel to reserve extra bus numbers below hotplug bridges, which +# would change the bus numbers of bridges above a preserved endpoint if they +# were reassigned. + +source "$test_dir/pci/pci_vmtest_lib.sh" + +pci_topology_switch + +# The generic host bridge driver used on arm64 and riscv64 reassigns all bus +# numbers, but x86 must be asked to. +if [[ "$arch" == "x86" ]]; then + TEST_CMDLINE_STAGE2="pci=assign-busses,hpbussize=16" +else + TEST_CMDLINE_STAGE2="pci=hpbussize=16" +fi -- 2.56.1.911.g883d8bcb20-goog