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=1796172014; b=fgAsYH4Gt44xSXmZ8avDf4Iv8hJn+jp45KGZUsptvePhUpICR58LM9eYlmnhCpYJb9du kAtw1n+zSLVPsCYnq8xe5xPhgGDE6nCvE2mS1CFnetuJQuqom3MsoOngUyE7PnHeK4fQd 6byBhNejAyw7MSU8x2KHGjieJVV2iVZ+PPPor5MxmlJ5Jg6KpoZgf5/TipCawwojWL16x 57X3AQK/bbdbHwkxhD9f/5aBaxfBfRDlNCMYYcerf3Ohf2PSLaqldE9h0k6iLGXHUlbp7 aSB2M0xy5xNc7s58og3K+gdb5+66yXfTLGe3qYwusuUeDvP9Qe9lAgflg4LiuWTMA/Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796172014; 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=HW761INJEnwOQvTPE5V4LmN3EyLJ5wcEIkbFsIZ1K173Ucq9EX9y10vbfx5p3rIPWSZS jd8KI+aZNeZ/Y8WmQmeivtRHFVPM+Oj2cGIMALmjFPLFdMaABKLGGHX3VHeL0GEr2kIbC I/FtP8+jXdLFAluOlGxOca90frlOuN+jWI43voeCWlnP8kKA0t83RDcJ1mWDwC4AtMGFC IE4xcgPWshiFcJCJTAzFAuTH0s1MG+xvZfHII0upxcK0ZRkMuWXb42T/1zkrkcKdoqD/Q 7yeDdKpvyaQ0QOIhpQ/4pi9kG5fNqql1rJ8mdqH58y4JMqnVmq5577ah+9zdCtWeZWQ== 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.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 9667560A3838 for ; Wed, 2 Dec 2026 00:40:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9667560A3838 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-ot1-f69.google.com with SMTP id 46e09a7af769-85f37d25fa3so10991078a34.1 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=exb8nDbsLuI2vLcxo/lB1Brk27vgQZnrEk5tEJf4OS1DZbOY4mao+A/x+9Sof9Er7T 4opvtVn8vjDvj6TrBbvGWcdqFp4t+84XvlGXAbAKUt3sa++IL2nki0fRNVw6ueoK6BRg nT59OZnaKIy5Eo5OelJM8Ft9O65Mu9Lr7ooyrhvFr9/cATQ4rDy07yoqcNA6CYFhkA9J H8ojCHQYi0OKHyxbYUClIrWMIA3gb2U2bXTCyYprpLhWeVymcCUzqBUa5rMj9vg7hHUl 3mYnxn3oxt3D3Qz3817khf3zfmYSr7MXbauCy5HYT0+V+NlAbYhn/3Rx0RWVv+PFEeSu 8V1w== X-Forwarded-Encrypted: i=1; AL+hErG3sUFWUDNLtA3IvVM/sXOl+6pDmSCeMMN9XAuEdcPrQniVyj1uoDkw2tC+ZYWs3vTMZzedIoWBT+w=@vger.kernel.org X-Gm-Message-State: APuU4Z/T1ppIJeR/SevnvY42SjHoqIHZPmPcQ9cTQyekFZIM9OqQBMS7 W9wxyE+ADDaEpEGlQyGlwBP8D2r8ZQ4svg0ItCY1dfVUNCVu0hBdFlUkHyl9OwG4o/eeUCJDfBs 7seKyed/hF4fNwQ== 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-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-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