diff options
author | Niklas Cassel <cassel@kernel.org> | 2024-11-16 04:20:45 +0100 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2025-01-21 09:44:14 -0600 |
commit | d6658d3338f84173fb55c9d6c6cdfa57f879712d (patch) | |
tree | abf77eda6e1bff7309c53d27bd6a629953318289 /include/uapi | |
parent | 0d292a1e6d90ff899342734d9ecfda59394daa42 (diff) |
misc: pci_endpoint_test: Add consecutive BAR test
Add a more advanced BAR test that writes all BARs in one go, and then reads
them back and verifies that the value matches the BAR number bitwise OR'ed
with offset, this allows us to verify:
- The BAR number was what we intended to read
- The offset was what we intended to read
This allows us to detect potential address translation issues on the EP.
Reading back the BAR directly after writing will not allow us to detect the
case where inbound address translation on the endpoint incorrectly causes
multiple BARs to be redirected to the same memory region (within the EP).
Link: https://lore.kernel.org/r/20241116032045.2574168-2-cassel@kernel.org
Signed-off-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Krzysztof WilczyĆski <kwilczynski@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Diffstat (limited to 'include/uapi')
-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 94b46b043b53..acd261f49866 100644 --- a/include/uapi/linux/pcitest.h +++ b/include/uapi/linux/pcitest.h @@ -20,6 +20,7 @@ #define PCITEST_MSIX _IOW('P', 0x7, int) #define PCITEST_SET_IRQTYPE _IOW('P', 0x8, int) #define PCITEST_GET_IRQTYPE _IO('P', 0x9) +#define PCITEST_BARS _IO('P', 0xa) #define PCITEST_CLEAR_IRQ _IO('P', 0x10) #define PCITEST_FLAGS_USE_DMA 0x00000001 |