On Mon, Nov 16, 2026 at 10:02:56AM -0800, David Matlack wrote: > > > The way I designed the P2P selftest support requires 2 things: > > > > > > (A) initiator: A device that has a VFIO selftests driver. > > > (B) target: A device that can provide a memory BAR > > > (vfio_pci_find_mem_bar()). > > > > > > So far I haven't found a single device that can do both. But you are > > > right that theoretically a single device could satisfy both > > > requirements. > > > > mlx5 can do both > > Looks like GPUs and NVMe can do both as well. > > How would we implement vfio_pci_find_mem_bar() for mlx5? BTW for the > target device, by "a memory BAR" I meant "a region of a memory BAR > that behaves like normal RAM". Sorry that was not clear.
It's a litlle complicated, you have to allocate a "Device memory" (DM) from the FW, then you get a chunk of BAR that is like RAM. There may also be some device boot time configuration that has to be done to turn it on, I forget. Jason
