On Wed, 28 May 2025 21:51:47 -0300 Jason Gunthorpe <jgg@xxxxxxxx> wrote: > On Wed, May 28, 2025 at 02:09:41PM -0600, Alex Williamson wrote: > > > To be fair to libvirt, we'd really like libvirt to make use of iommufd > > whenever it's available, but without feature parity this would break > > users. > > If people ask there should be no issue with making API functionality > discoverable with a query command of some kind. Alot of new stuff is > already discoverable by invoking an ioctl with bogus arguments and > checking for EOPNOTSUPP/ENOTTY. > > But most likely P2P will use the same ioctl as memfd so it will not > work that way. > > So for now libvirt could assume no P2P support in iommufd. A simple > algorithm would be to look for more than 1 VFIO device. Or add an xml > "disable P2P" which is a useful thing anyhow. Hotplug is always a problem if we make assumptions based on device counts. Thanks, Alex