> From: Liu, Yi L <yi.l....@intel.com>
> Sent: Saturday, April 1, 2023 10:44 PM

> @@ -791,7 +813,21 @@ static int vfio_pci_fill_devs(struct pci_dev *pdev, void 
> *data)
>       if (!iommu_group)
>               return -EPERM; /* Cannot reset non-isolated devices */

Hi Alex,

Is disabling iommu a sane way to test vfio noiommu mode? If no, just skip
the below contents. 😊 If yes, then may need to check if below is expected.

I added intel_iommu=off to disable intel iommu and bind a device to vfio-pci.
I can see the /dev/vfio/noiommu-0 and /dev/vfio/devices/noiommu-vfio0. Bind
iommufd==-1 can succeed, but failed to get hot reset info due to the above
group check. Reason is that this happens to have some affected devices, and
these devices have no valid iommu_group (because they are not bound to vfio-pci
hence nobody allocates noiommu group for them). So when hot reset info loops
such devices, it failed with -EPERM. Is this expected?

Regards,
Yi Liu

Reply via email to