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=1796172015; b=BI7Pl5COg2UP3nJUUowtNM7AzfJXalshEBoPkJtXIMd+3e+BW6mXNn78qIPJpsO256We LxIjTvj9h55aDqAfbf7Z/i9opSu7CmHyAYygzHNiX1vPRpNVUK/HxPoFcEs/v6p4aVBJF WmF0nmsTr76uyI8hsleyfoeuuD0qaz87DYnfoUeT6qVf/JlfnCwLLQTt4BCCsV8tas/lw sOR4cC2glQ7aaTlfFCYUX+8J30grgn4Szwm2QpL8FlmsnlCzUQvFIzvj5mIbjgJUKr+uz fq0ca5rjOt39RH0dK0ytQo8FCPfXQ3SBXZtc9JIMFDUUUW67f/xc+SskMP4OSHTXFXg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796172015; 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=c4dMKNuGCGq7rNCOYl/kD/nqYtxLMotRtuyP68qmlgo=; b=TEYW6XYNBKKxmXMLQGeS7mRigVJ4AjXzKUaPnk6Nhbvoojt7U5DJUsXmCVwCrX9NbAFy f2kvuageLqtMF+x4WnUH6qNLLxdVFS5GLN89+WuXx5D6A+eD6IUU4c/VGtWqaw3ZDsgYz +smAroChvdEFq2QqF2MwV+zICxY09uQpGvs/GvOZXmvEwBU2GQIs2BBj2axIUxmuMjBSX u7G4fKgyVq4nJIay63BRsTU+lFVbRvDqc5Kgz0vCEKkborwVgfm39SrMH66DTCu3AS4Yg 4L823+yZ5p/LK/GmFRUBAtI0XrwPI67eb8NpFOTjL4MvlrdWiZSpkYzdnnVcFPVQa6g== 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="iaG/4kp6"; 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 9779660A383A for ; Wed, 2 Dec 2026 00:40:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9779660A383A 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=iaG/4kp6 Received: by mail-oi1-f198.google.com with SMTP id 5614622812f47-57eac2a0602so4219446b6e.2 for ; Tue, 01 Dec 2026 16:40:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796172013; x=1796776813; 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=c4dMKNuGCGq7rNCOYl/kD/nqYtxLMotRtuyP68qmlgo=; b=iaG/4kp63lhuDKD4RUWisrKg5GGB3C0rdYJtfgMltVCXYhIfFIlZtPa7jy0bL7Ehgu V+DBJbP367XxjgWD+32q6lDmLYZDeOZp+AV3Jn/NVpk42Ou0xzpTBP5VoHhc1kR8s+dc yEvG0D4Il6Ja4bSNrCNXuapTH7+7F5A/kICMtmIdo1rj7U6sJEXfPS1lOT3IHwcbdW4N jWrGghRLEWyVNQZ/suspv8l7TTSRff2e0ZxzK84nVxDr0kitk0qWtcs0s9N3BlhvRoGf QzTHHZndFr+qqPsqOc/5MisXsW/dU2oSlq/DgHz9PLfhIi9BsMUMpFQEdi3iilp1zuIq D1HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796172013; x=1796776813; 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=c4dMKNuGCGq7rNCOYl/kD/nqYtxLMotRtuyP68qmlgo=; b=yoawRDeQ8D4dSjKr3Oqbhyn7xEYTeyJJr2vRtpNmz5kZI70BdkQJu1ZcGKjkHuYJZJ Ukd9g1ofVXlofUIfsp3w8HrhMxkOSmIA3bFjOaxf5+L3AwNAX+JnfEvsPFuvIqRd56Kl LWO5DvOCWjk3r678Z0tVEi57owPRoSc0gYMNvd/aOExNMTpaMANyJSZNhMEMY3kthGGq IQH0zmRaYryhYE4IxAlOAlyoYtow3A1uA+Ltjr9s+iWccsDIZ/21P6pWwwwl4JXU4eR+ nN60QjDex2d7mzmC3YPeK+pORvksgLWFfROtAJ43aoF/i/+dmb6BEk0bongr35+dzd1S zH+Q== X-Forwarded-Encrypted: i=1; AL+hErGKbR2+E/bCJwxSW6B+Ib/Yvys9A2+AZAPyUKf5egfNV7DztKGnFYDweDAEmQ+rSw6eGp4r5U3KEmTju9E=@vger.kernel.org X-Gm-Message-State: APuU4Z8NGMIQuw6rVCSb2/fRxhNFnU/9IQZl8uIn6vwtmGWCg3kBlEQe MtwdOr2v+0zix5Dky5b/VJTBerR5YQtfVBFa/z+aSVKrhYkG9SHIJ/pRfcyCIj2XjMoEFvhk3bO udK9nXSrkse2czg== X-Received: from iodz18.prod.google.com ([2002:a05:6602:6f52:b0:9c4:a4a1:b54d]) (user=dmatlack job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6808:4f46:b0:578:c3ab:6abc with SMTP id 5614622812f47-57a0ae27349mr46578717b6e.32.1796172013375; Tue, 01 Dec 2026 16:40:13 -0800 (PST) Date: Wed, 2 Dec 2026 00:39:50 +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-14-dmatlack@google.com> Subject: [PATCH 13/18] selftests/liveupdate: pci: Add a test with an endpoint on the root bus 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 preserves an endpoint on the root bus, i.e. with no bridges above it, next to a control endpoint on the root bus. QEMU reserves the routing IDs of IGB's VFs (offset 0x80, stride 2) on the same bus as the IGB itself, so the two endpoints are placed at devices 2 and 4 to keep their VFs' routing IDs from overlapping. Signed-off-by: David Matlack --- .../selftests/liveupdate/pci/root_bus.vmtest.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tools/testing/selftests/liveupdate/pci/root_bus.vmtest.sh diff --git a/tools/testing/selftests/liveupdate/pci/root_bus.vmtest.sh b/tools/testing/selftests/liveupdate/pci/root_bus.vmtest.sh new file mode 100644 index 000000000000..e0d24a00aae7 --- /dev/null +++ b/tools/testing/selftests/liveupdate/pci/root_bus.vmtest.sh @@ -0,0 +1,13 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Preserve an endpoint on the root bus, i.e. with no bridges above it. + +source "$test_dir/pci/pci_vmtest_lib.sh" + +# QEMU reserves the routing IDs of IGB's VFs (offset 0x80, stride 2) on the same +# bus, i.e. devices 18-19 for the IGB at device 2 and 20-21 for device 4. +pci_igb igb1 pcie.0 0x2 +pci_igb igb2 pcie.0 0x4 + +pci_preserve 0000:00:02.0 +pci_control 0000:00:04.0 -- 2.56.1.911.g883d8bcb20-goog