diff options
| author | Koichiro Den <den@valinux.co.jp> | 2026-01-24 23:50:11 +0900 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2026-01-29 17:42:29 -0600 |
| commit | 8cf82bb558517503a81f8e3c49914c0836360aa6 (patch) | |
| tree | aad5c16b237a4e7b588cc94d6f0f357bab3cca47 /include/uapi/linux | |
| parent | 6c5e6101423b0dbda417d92d1552a4e2c669a76c (diff) | |
misc: pci_endpoint_test: Add BAR subrange mapping test case
Add a new PCITEST_BAR_SUBRANGE ioctl to exercise EPC BAR subrange
mapping end-to-end.
The test programs a simple 2-subrange layout on the endpoint (via
pci-epf-test) and verifies that:
- the endpoint-provided per-subrange signature bytes are observed at
the expected PCIe BAR offsets, and
- writes to each subrange are routed to the correct backing region
(i.e. the submap order is applied rather than accidentally working
due to an identity mapping).
Return -EOPNOTSUPP when the endpoint does not advertise subrange
mapping, -ENODATA when the BAR is disabled, and -EBUSY when the BAR is
reserved for the test register space.
Signed-off-by: Koichiro Den <den@valinux.co.jp>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/20260124145012.2794108-8-den@valinux.co.jp
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/pcitest.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/pcitest.h b/include/uapi/linux/pcitest.h index d6023a45a9d0..710f8842223f 100644 --- a/include/uapi/linux/pcitest.h +++ b/include/uapi/linux/pcitest.h @@ -22,6 +22,7 @@ #define PCITEST_GET_IRQTYPE _IO('P', 0x9) #define PCITEST_BARS _IO('P', 0xa) #define PCITEST_DOORBELL _IO('P', 0xb) +#define PCITEST_BAR_SUBRANGE _IO('P', 0xc) #define PCITEST_CLEAR_IRQ _IO('P', 0x10) #define PCITEST_IRQ_TYPE_UNDEFINED -1 |
