From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.167.197 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796172018; b=wp9jARlaV4ueKv7OkAzr7Vepsy+HskePjGQW//D5gWmvDAc4mBK8zkxly2k966qRMbXY G4jlmD38FU0nemnIFj3q/IwSQxTBZI3gy6KYf6A9GREct8HlS4XgVNJ8YOBCsliD5oD7q S0bPtz5t8u4Ukp4qC1Zk8LEA5YAZ3FdtdxkWw446/3Mp8pUsadm7FCLhoWToL/gJZG11I 4l1IdxKBn7yHGtryd9qbOVp/CIYmRcwwSGjP/whKOBox7nVeOepwciZPl57THNZfAbnig +4lqJIjPFLsDXlZF26f74zYbrrUlqqtzV/G7i5OjMQXR8EcPJXWKlnOYIdQJcnV+Mxg== 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=JoeCKgi46NpAObuzoy+6poF8HgLuUyHU9hNuMMduPiHdukBKmSjVuzl2bdfTz7oE/G6m m8ZsMQZycMlo6T+EgqAp1LtuC3okpQYHEqm2EjAk3we+nkrn3n0U6st64xEk9yaKKdkxm sIIH8iFZOud7UfxlBSJnvKe0IguSq7y69Y/Gu0NYKjVzcqKwqZUIJ9yH7s0zc8b73edgD Guh0HN/2LwwFjxMeiyFw/UEyD2JB4mzfI0qKGNvCHK3Klc4puuLssJCKSFH88QHgyn9fH ckgUWVxWIeVj+ZqtD0rzGFw27Iguq0J71/D9VT3eNPLeZdo9xfkyfT3sO0Nv2ZF06cQ== 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.197 Received: from mail-oi1-f197.google.com (mail-oi1-f197.google.com [209.85.167.197]) (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 E7D4E60A6F44 for ; Wed, 2 Dec 2026 00:40:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E7D4E60A6F44 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-f197.google.com with SMTP id 5614622812f47-574ae6cc614so10992612b6e.1 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=Tb+q45Dn091HmkyH8ahbVrztvrt5hPq7xp76hWlwHAA0Iyf4BfA91mRb38LZ5Sl/05 G0dN4AVS5a53fAXM3I/zK80FRe6usglFDNrRTMtBKlrLOll4yO2A8OE8zuRExYDBqoV1 60yCjDM024lAWwU14hpm8uh4fgt+2LT63/tM84rPSEUe/Pdz8Yw4F0GBgpX6pIA6r4Kt 0dCwbK6GOwqMFl4bSgF1fzP1p4it1UGVoIPBykcSgKIkcOuCRR7v3IQtAlU8Kzij+teU vxO7TC1EDMd6v3yWsaaM6I8oEcuUgJwzVRDI6oN2q8Z7c/lL/N5GSdNLl43XBynmvZYs UwCw== X-Forwarded-Encrypted: i=1; AL+hErFVzp4nVL+P4AH5v+TYvvu9tcBdI7EGK0DGbxTPu6hfiZKNdwWvO1f3vgoJXb6VTaja2ZrfiAKmzkE=@vger.kernel.org X-Gm-Message-State: APuU4Z/GETje/M8HDKkcrIKuI/cXiboxUOBI2zRgAWbxYoBdHY1hoasL t/N7ZvK4FdPwoQjXXdJJ2u0/jM89+xmSl/e+ojhy0SYGyumgtOHDNkLJ/GsrAOQ9ttbK/wZ2D8V OH0Tr/SIYJ8CQGQ== 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-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-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