Re: [PATCH] vfio: selftests: Add NVMe driver

From: Josh Hilke

Date: Wed Dec 02 2026 - 20:41:01 EST


On Wed, Nov 25, 2026 at 4:12 PM David Matlack <dmatlack@xxxxxxxxxx> wrote:
>
> memcpy_start() is supposed to kick off @count memcpy operations, i.e.
> @count DMA reads of @src and @count DMA writes to @dst. This only reads
> @src once. Please do @count writes from @src as well. e.g. keep the
> first write and the wait for it, and then queue the other @count - 1
> writes along with the @count reads. Once the first write completes, the
> blocks already hold @src, and the other writes store the same data, so
> the reads see @src no matter what order the controller runs them in.
>
> Note that max_memcpy_count will need to account for the extra commands
> (2 * @count - 1 in flight instead of @count).
>
> One possible concern with this is SSD wear. memcpy_storm would write
> around max_memcpy_count * max_memcpy_size (several GiB) per run on a real
> SSD, for each IOMMU mode. That's probably fine on datacenter drives, but
> I'm curious what you think.

I'll update the driver to do @count writes in v2.

SSD wear will only be an issue someone's running vfio_pci_driver_test
in a continuous integration loop. It shouldn't be a problem for
occasional manual runs.

- Josh Hilke