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

From: Alex Williamson

Date: Fri Dec 04 2026 - 11:11:25 EST


On Fri, 4 Dec 2026 09:24:56 +0100
Christoph Hellwig <hch@xxxxxx> wrote:

> On Fri, Dec 04, 2026 at 01:52:03AM +0000, Josh Hilke wrote:
> > Add a VFIO selftest driver for NVMe controllers. It binds to any PCI
> > function with the NVMe PCI class code 01:08:02, so vfio_pci_driver_test
> > can run on the NVMe SSDs that are common in servers, and on the nvme
> > device that QEMU emulates.
>
> Err, what? I really don't think the kernel tree is the place for
> userland nvme drivers. Use one of the existing well-tested ones like
> SPDK to write your tests, please.

This is a device specific selftest driver, not a general purpose
userspace NVMe driver. We're implementing low-level tests around
DMA memory copies and interrupt generation. NVMe is an interesting
device for this as it has the potential to support p2p DMA and
migration. It's also ubiquitous.

Full function drivers like SPDK do not provide this low level
granularity of testing. We're trying to test the vfio interface, not
validate a full stack userspace driver. Thanks,

Alex