I have a possibly-buggy piece of hardware and a possibly-buggy userspace driver for it that relies on the vfio-pci kernel driver. I'd like to test the driver without dealing with the hardware.
I imagine the ideal solution would be something like: run my whole stack except for the hardware (application, userspace driver, VFIO driver) and intercept everything that the VFIO driver decides to send on to the hardware. Then I could verify that the hardware is getting the right info -- resets are happening at the expected time, DMAs are going to the right addresses, etc.
I guess I'm looking for something like a mock device that will let me run userspace code underneath vfio-pci rather than running hardware. Does such a thing exist?