]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
vfio: selftests: Add driver for Intel CBDMA
authorDavid Matlack <dmatlack@google.com>
Fri, 22 Aug 2025 21:25:06 +0000 (21:25 +0000)
committerAlex Williamson <alex.williamson@redhat.com>
Wed, 27 Aug 2025 18:14:08 +0000 (12:14 -0600)
commit2223587df5c5e935cc6f973f62a9608eef81bec8
tree2384a0f7b1cfbed3f1fb4210911ca9aa0f083d95
parentb7f086912c1d3ce1e8c2753e0ff329947219d0f6
vfio: selftests: Add driver for Intel CBDMA

Add a driver for the Intel CBDMA device. This driver is based on and
named after the Linux driver for this device (drivers/dma/ioat/) and
also based on previous work from Peter Shier <pshier@google.com>.

The driver aims to be as simple as possible. It uses a single descriptor
to issue DMA operations, and only supports the copy operation. For "DMA
storms", the driver kicks off the maximum number of maximum-sized DMA
operations. On Skylake server parts, this was 2^16-1 copies of size 2M
and lasts about 15 seconds.

Create symlinks to drivers/dma/ioat/{hw.h,registers.h} to get access to
various macros (e.g. IOAT_CHANCMD_RESET) and struct ioat_dma_descriptor.

Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Acked-by: Dave Jiang <dave.jiang@intel.com>
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: David Matlack <dmatlack@google.com>
Link: https://lore.kernel.org/r/20250822212518.4156428-20-dmatlack@google.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
tools/testing/selftests/vfio/lib/drivers/ioat/hw.h [new symlink]
tools/testing/selftests/vfio/lib/drivers/ioat/ioat.c [new file with mode: 0644]
tools/testing/selftests/vfio/lib/drivers/ioat/registers.h [new symlink]
tools/testing/selftests/vfio/lib/libvfio.mk
tools/testing/selftests/vfio/lib/vfio_pci_driver.c