From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.167.198 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796172018; b=WwF8XZ+bYSc+h8cVPW8A2Y3nZVEfJ4l1Cpx7fu1wGKJWMq6ah4EbtZv4fT+pJItPwvMc q94hLoyvDd6++y7+9ZK8FbJ0BZKdoMRLa3mjo+bLxgM85YfpdNHCDsIjnvOxOv+y13wV5 8WL7bOwpu9o9+OhJO40L8m7UZ/3gzXKjQDt68l/DqRTyOqHKoi5c0hyxl2un3Vh+jY5Rj v6ObyraPz4MVUBTW4etDqUqTnNUD5ut5mjAONZfjwjRyeqSUlquHWIHEZuPOvOB2CJXpN gaCUwha+nVFKCZ4tKlvUHZbohUoPWnkRaDvUeRBI6VE6VheuVqI1aOgk9yKyBxieY1Q== 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=sbNS71tb3ftFVXPfpBNR6uU7WGKwgUoGwopUZaIq7GZ3jdpOqTOb/cFhdkCIPLEPy7AQ HhejbdOoHroVeJu4e6n0zaYYSvf4FXDbSBcRA5nlItyjaCY/+Nq2lxClkJXxjZJgMpWTb SQBBo/q2HKtte/Mp5Mb3cztiklL3e/snMZ5mTop+8PES+rbHjB03Lm3u4X830Yfg9dmO4 bwoxxfRvwM02Xxw0ky2/+QcR1nngZd99RPp/6nWojgOMUirntPAd7QC83JS2HE85eIiqF az0AnhKnGyexnfCWIM1AV0FO1PQeLseU3fB2UyjDIwi/+Dk9t6SWIKZ1qjXR0AI86xA== 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.198 Received: from mail-oi1-f198.google.com (mail-oi1-f198.google.com [209.85.167.198]) (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 0D4A860A6F47 for ; Wed, 2 Dec 2026 00:40:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0D4A860A6F47 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-f198.google.com with SMTP id 5614622812f47-5713cd0fb42so14342472b6e.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=YQNJ/sUqkJfq3KjSY4Ko5HQGbDF7/cPYBVQqAg26sC1O/JJt+1+iVmy/4KezjI09CX 0Hvu8cHIwZtF5r/XXH/e02jU+WV5NTAHpw/c4qLiFG9qWcSjXc6o5CO52BhEQpVlXwWa JzA1JQT+mlaaSK2QCgZ4QSwS3yyyFE1NtWAtAjRyhF4tmfQZ+oqOU+q7RPE2U9Jgiw6Y ewAaLh0LCXwFdhv26WcIq/f573PDwxVbjPp/xhJUoOo2srKaRvjqRfX662ExALnt+QWY YUd+e+8p5nH7PmOXYbU5VgEifdc6gL8PYMSqRAS3uIbt+EJB8x87qEE8lUcKOig0LKsJ Sz4w== X-Forwarded-Encrypted: i=1; AL+hErF0O6epr63jbnnmUfAthpbwz2K8VUJIQWTmXsb5s+GwCsAAyygrXxZV2MXcURRpipen4S83h6aOtoHHg34=@vger.kernel.org X-Gm-Message-State: APuU4Z99B6JeLXrt44niiEkrCYqQahvx1etFcXPzBm7m8zEoi2TUPvMX GXwFaaLyXXmPpf0OYuiKST11QS+trTNJJ8O4FQqlAVkqCUy9ro+tjpCeDli/d/YN5mdvuDjzt2E uzbtXfqPgC44e/g== 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-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-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