<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/testing/selftests/pci_endpoint, branch master</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=master</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2026-04-08T19:41:39Z</updated>
<entry>
<title>selftests: pci_endpoint: Skip BAR subrange test on -ENOSPC</title>
<updated>2026-04-08T19:41:39Z</updated>
<author>
<name>Christian Bruel</name>
<email>christian.bruel@foss.st.com</email>
</author>
<published>2026-04-07T12:04:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1d3225cb5d82680143ffd705088199917ceafd76'/>
<id>urn:sha1:1d3225cb5d82680143ffd705088199917ceafd76</id>
<content type='text'>
In pci-epf-test.c, set the STATUS_NO_RESOURCE status bit if
pci_epc_set_bar() returns -ENOSPC.  This status bit is used to indicate
that there are not enough inbound window resources to allocate the
subrange.

In pci_endpoint_test.c, return -ENOSPC instead of -EIO when
STATUS_NO_RESOURCE is set.

In pci_endpoint_test.c, skip the BAR subrange test if -ENOSPC, i.e., there
are not enough inbound window resources to run the test.

Signed-off-by: Christian Bruel &lt;christian.bruel@foss.st.com&gt;
[mani: commit log]
Signed-off-by: Manivannan Sadhasivam &lt;mani@kernel.org&gt;
[bhelgaas: squash related commits]
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Niklas Cassel &lt;cassel@kernel.org&gt;
Reviewed-by: Frank Li &lt;Frank.Li@nxp.com&gt;
Reviewed-by: Koichiro Den &lt;den@valinux.co.jp&gt;
Link: https://patch.msgid.link/20260407-skip-bar_subrange-tests-if-enospc-v4-1-6f2e65f2298c@foss.st.com
Link: https://patch.msgid.link/20260407-skip-bar_subrange-tests-if-enospc-v4-2-6f2e65f2298c@foss.st.com
Link: https://patch.msgid.link/20260407-skip-bar_subrange-tests-if-enospc-v4-3-6f2e65f2298c@foss.st.com
</content>
</entry>
<entry>
<title>selftests: pci_endpoint: Skip reserved BARs</title>
<updated>2026-03-15T16:34:28Z</updated>
<author>
<name>Niklas Cassel</name>
<email>cassel@kernel.org</email>
</author>
<published>2026-03-12T13:02:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e022f0c72c7f67fe79de03e71d839418073490a5'/>
<id>urn:sha1:e022f0c72c7f67fe79de03e71d839418073490a5</id>
<content type='text'>
Running a test against a reserved BAR will result in the pci-epf-test
driver returning -ENOBUFS.

Make sure that the pci_endpoint_test selftest will return skip instead of
failure or success for reserved BARs.

Signed-off-by: Niklas Cassel &lt;cassel@kernel.org&gt;
Signed-off-by: Manivannan Sadhasivam &lt;mani@kernel.org&gt;
Tested-by: Manikanta Maddireddy &lt;mmaddireddy@nvidia.com&gt;
Tested-by: Koichiro Den &lt;den@valinux.co.jp&gt;
Reviewed-by: Manikanta Maddireddy &lt;mmaddireddy@nvidia.com&gt;
Reviewed-by: Frank Li &lt;Frank.Li@nxp.com&gt;
Link: https://patch.msgid.link/20260312130229.2282001-22-cassel@kernel.org
</content>
</entry>
<entry>
<title>selftests: pci_endpoint: Skip doorbell test when unsupported</title>
<updated>2026-02-24T10:31:04Z</updated>
<author>
<name>Koichiro Den</name>
<email>den@valinux.co.jp</email>
</author>
<published>2026-02-15T15:03:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b4a31737679576dc8aa6de43d3c10bfad7d3f57e'/>
<id>urn:sha1:b4a31737679576dc8aa6de43d3c10bfad7d3f57e</id>
<content type='text'>
PCITEST_DOORBELL may return -EOPNOTSUPP when the endpoint does not
advertise CAP_DYNAMIC_INBOUND_MAPPING.

Treat this like other optional capabilities and skip the doorbell test
instead of reporting a failure.

Suggested-by: Niklas Cassel &lt;cassel@kernel.org&gt;
Signed-off-by: Koichiro Den &lt;den@valinux.co.jp&gt;
Signed-off-by: Manivannan Sadhasivam &lt;mani@kernel.org&gt;
Reviewed-by: Niklas Cassel &lt;cassel@kernel.org&gt;
Link: https://patch.msgid.link/20260215150334.3391943-4-den@valinux.co.jp
</content>
</entry>
<entry>
<title>selftests: pci_endpoint: Add BAR subrange mapping test case</title>
<updated>2026-01-29T23:42:37Z</updated>
<author>
<name>Koichiro Den</name>
<email>den@valinux.co.jp</email>
</author>
<published>2026-01-24T14:50:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c17b9046faf7d1f3b8bb992e4d53da873dc478fc'/>
<id>urn:sha1:c17b9046faf7d1f3b8bb992e4d53da873dc478fc</id>
<content type='text'>
Add BAR_SUBRANGE_TEST to the pci_endpoint kselftest suite.

The test uses the PCITEST_BAR_SUBRANGE ioctl and will skip when the
chosen BAR is disabled (-ENODATA), when the endpoint/controller does not
support subrange mapping (-EOPNOTSUPP), or when the BAR is reserved for
the test register space (-EBUSY).

Signed-off-by: Koichiro Den &lt;den@valinux.co.jp&gt;
Signed-off-by: Manivannan Sadhasivam &lt;mani@kernel.org&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Link: https://patch.msgid.link/20260124145012.2794108-9-den@valinux.co.jp
</content>
</entry>
<entry>
<title>selftests: complete kselftest include centralization</title>
<updated>2025-11-27T22:24:31Z</updated>
<author>
<name>Bala-Vignesh-Reddy</name>
<email>reddybalavignesh9979@gmail.com</email>
</author>
<published>2025-10-16T10:44:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e6fbd1759c9ece5044d3470f30a5e2166dc9de89'/>
<id>urn:sha1:e6fbd1759c9ece5044d3470f30a5e2166dc9de89</id>
<content type='text'>
This follow-up patch completes centralization of kselftest.h and
ksefltest_harness.h includes in remaining seltests files, replacing all
relative paths with a non-relative paths using shared -I include path in
lib.mk

Tested with gcc-13.3 and clang-18.1, and cross-compiled successfully on
riscv, arm64, x86_64 and powerpc arch.

[reddybalavignesh9979@gmail.com: add selftests include path for kselftest.h]
  Link: https://lkml.kernel.org/r/20251017090201.317521-1-reddybalavignesh9979@gmail.com
Link: https://lkml.kernel.org/r/20251016104409.68985-1-reddybalavignesh9979@gmail.com
Signed-off-by: Bala-Vignesh-Reddy &lt;reddybalavignesh9979@gmail.com&gt;
Suggested-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Link: https://lore.kernel.org/lkml/20250820143954.33d95635e504e94df01930d0@linux-foundation.org/
Reviewed-by: Wei Yang &lt;richard.weiyang@gmail.com&gt;
Cc: David Hildenbrand &lt;david@redhat.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Günther Noack &lt;gnoack@google.com&gt;
Cc: Jakub Kacinski &lt;kuba@kernel.org&gt;
Cc: Liam Howlett &lt;liam.howlett@oracle.com&gt;
Cc: Lorenzo Stoakes &lt;lorenzo.stoakes@oracle.com&gt;
Cc: Michal Hocko &lt;mhocko@suse.com&gt;
Cc: Mickael Salaun &lt;mic@digikod.net&gt;
Cc: Ming Lei &lt;ming.lei@redhat.com&gt;
Cc: Paolo Abeni &lt;pabeni@redhat.com&gt;
Cc: Shuah Khan &lt;shuah@kernel.org&gt;
Cc: Simon Horman &lt;horms@kernel.org&gt;
Cc: Suren Baghdasaryan &lt;surenb@google.com&gt;
Cc: Vlastimil Babka &lt;vbabka@suse.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: pci_endpoint: Skip IRQ test if IRQ is out of range.</title>
<updated>2025-08-27T13:11:00Z</updated>
<author>
<name>Christian Bruel</name>
<email>christian.bruel@foss.st.com</email>
</author>
<published>2025-08-04T17:09:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=106fc08b30a2ece49a251b053165a83d41d50fd0'/>
<id>urn:sha1:106fc08b30a2ece49a251b053165a83d41d50fd0</id>
<content type='text'>
The pci_endpoint_test tests the entire MSI/MSI-X range, which generates
false errors on platforms that do not support the whole range.

Skip the test in such cases and report accordingly.

Signed-off-by: Christian Bruel &lt;christian.bruel@foss.st.com&gt;
[mani: reworded description]
Signed-off-by: Manivannan Sadhasivam &lt;mani@kernel.org&gt;
Link: https://patch.msgid.link/20250804170916.3212221-4-christian.bruel@foss.st.com
</content>
</entry>
<entry>
<title>selftests: pci_endpoint: Add doorbell test case</title>
<updated>2025-07-24T21:51:47Z</updated>
<author>
<name>Frank Li</name>
<email>Frank.Li@nxp.com</email>
</author>
<published>2025-07-10T19:13:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b351e9c93a4fc0a1b789c0b89eeecb9d5bf564cd'/>
<id>urn:sha1:b351e9c93a4fc0a1b789c0b89eeecb9d5bf564cd</id>
<content type='text'>
Add doorbell test case.

Signed-off-by: Frank Li &lt;Frank.Li@nxp.com&gt;
[mani: Reworded the testcase description]
Signed-off-by: Manivannan Sadhasivam &lt;mani@kernel.org&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Tested-by: Niklas Cassel &lt;cassel@kernel.org&gt;
Link: https://patch.msgid.link/20250710-ep-msi-v21-8-57683fc7fb25@nxp.com
</content>
</entry>
<entry>
<title>misc: pci_endpoint_test: Add support for PCITEST_IRQ_TYPE_AUTO</title>
<updated>2025-03-26T06:11:54Z</updated>
<author>
<name>Niklas Cassel</name>
<email>cassel@kernel.org</email>
</author>
<published>2025-03-10T11:10:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=08818c6d7f276eb5895959f34c491a3911ae7820'/>
<id>urn:sha1:08818c6d7f276eb5895959f34c491a3911ae7820</id>
<content type='text'>
For PCITEST_MSI we really want to set PCITEST_SET_IRQTYPE explicitly
to PCITEST_IRQ_TYPE_MSI, since we want to test if MSI works.

For PCITEST_MSIX we really want to set PCITEST_SET_IRQTYPE explicitly
to PCITEST_IRQ_TYPE_MSIX, since we want to test if MSI works.

For PCITEST_LEGACY_IRQ we really want to set PCITEST_SET_IRQTYPE
explicitly to PCITEST_IRQ_TYPE_INTX, since we want to test if INTx
works.

However, for PCITEST_WRITE, PCITEST_READ, PCITEST_COPY, we really don't
care which IRQ type that is used, we just want to use a IRQ type that is
supported by the EPC.

The old behavior was to always use MSI for PCITEST_WRITE, PCITEST_READ,
PCITEST_COPY, was to always set IRQ type to MSI before doing the actual
test, however, there are EPC drivers that do not support MSI.

Add a new PCITEST_IRQ_TYPE_AUTO, that will use the CAPS register to see
which IRQ types the endpoint supports, and use one of the supported IRQ
types.

For backwards compatibility, if the endpoint does not expose any supported
IRQ type in the CAPS register, simply fallback to using MSI, as it was
unconditionally done before.

Signed-off-by: Niklas Cassel &lt;cassel@kernel.org&gt;
Signed-off-by: Krzysztof Wilczyński &lt;kwilczynski@kernel.org&gt;
Link: https://lore.kernel.org/r/20250310111016.859445-16-cassel@kernel.org
</content>
</entry>
<entry>
<title>selftests: pci_endpoint: Use IRQ_TYPE_* defines from UAPI header</title>
<updated>2025-03-14T16:12:04Z</updated>
<author>
<name>Niklas Cassel</name>
<email>cassel@kernel.org</email>
</author>
<published>2025-03-10T11:10:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=24a42582b00810970decb051ce3e25d2c661dd92'/>
<id>urn:sha1:24a42582b00810970decb051ce3e25d2c661dd92</id>
<content type='text'>
In order to improve readability, use the IRQ_TYPE_* defines from the UAPI
header rather than using raw values.

No functional change.

Signed-off-by: Niklas Cassel &lt;cassel@kernel.org&gt;
Signed-off-by: Krzysztof Wilczyński &lt;kwilczynski@kernel.org&gt;
Link: https://lore.kernel.org/r/20250310111016.859445-12-cassel@kernel.org
</content>
</entry>
<entry>
<title>selftests: pci_endpoint: Add GET_IRQTYPE checks to each interrupt test</title>
<updated>2025-03-08T14:36:00Z</updated>
<author>
<name>Kunihiko Hayashi</name>
<email>hayashi.kunihiko@socionext.com</email>
</author>
<published>2025-02-25T11:02:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a28d2f2398060a27ca3ad89d33c9761c7afd5b8a'/>
<id>urn:sha1:a28d2f2398060a27ca3ad89d33c9761c7afd5b8a</id>
<content type='text'>
Add GET_IRQTYPE API checks to each interrupt test.

While at it, change pci_ep_ioctl() to get the appropriate return
value from ioctl().

Suggested-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
Signed-off-by: Kunihiko Hayashi &lt;hayashi.kunihiko@socionext.com&gt;
Link: https://lore.kernel.org/r/20250225110252.28866-2-hayashi.kunihiko@socionext.com
[kwilczynski: commit log]
Signed-off-by: Krzysztof Wilczyński &lt;kwilczynski@kernel.org&gt;
</content>
</entry>
</feed>
