Re: [RFC v2 13/15] vfio/iommufd: Implement the iommufd backend

2022-10-05 Thread Eric Auger
Hi Alister, On 10/4/22 08:47, Alistair Popple wrote: > Yi Liu writes: > > [...] > >> +static int vfio_get_devicefd(const char *sysfs_path, Error **errp) >> +{ >> +long int ret = -ENOTTY; >> +char *path, *vfio_dev_path = NULL, *vfio_path = NULL; >> +DIR *dir; >> +struct dirent

Re: [RFC v2 13/15] vfio/iommufd: Implement the iommufd backend

2022-10-04 Thread Alistair Popple
Yi Liu writes: [...] > +static int vfio_get_devicefd(const char *sysfs_path, Error **errp) > +{ > +long int ret = -ENOTTY; > +char *path, *vfio_dev_path = NULL, *vfio_path = NULL; > +DIR *dir; > +struct dirent *dent; > +gchar *contents; > +struct stat st; > +gsize

[RFC v2 13/15] vfio/iommufd: Implement the iommufd backend

2022-06-08 Thread Yi Liu
Add the iommufd backend. The IOMMUFD container class is implemented based on the new /dev/iommu user API. This backend obviously depends on CONFIG_IOMMUFD. So far, the iommufd backend doesn't support live migration and cache coherency yet due to missing support in the host kernel meaning that