On Mon, Feb 14, 2022 at 09:18:53AM -0400, Jason Gunthorpe wrote: > On Mon, Feb 14, 2022 at 10:59:50AM +0100, Greg Kroah-Hartman wrote: > > > > + if (ret && !drv->no_kernel_api_dma) > > > + iommu_device_unuse_dma_api(dev); > > > > So you are now going to call this for every platform driver _unless_ > > they set this flag? > > Yes, it is necessary because VFIO supports platform devices as well > and needs to ensure security. Conflicting kernel driver attachements > must be blocked, just like for PCI. A platform device shouldn't be using VFIO, but ugh, oh well, that ship has sailed :( And stop it with the "security" mess, do not give people a false sense of it here please. thanks, greg k-h