From: Jason Gunthorpe jgg@nvidia.com Sent: Tuesday, November 8, 2022 8:49 AM
This is the basic infrastructure of a new miscdevice to hold the iommufd IOCTL API.
It provides:
A miscdevice to create file descriptors to run the IOCTL interface over
A table based ioctl dispatch and centralized extendable pre-validation step
An xarray mapping userspace ID's to kernel objects. The design has multiple inter-related objects held within in a single IOMMUFD fd
A simple usage count to build a graph of object relations and protect against hostile userspace racing ioctls
The only IOCTL provided in this patch is the generic 'destroy any object by handle' operation.
Reviewed-by: Lu Baolu baolu.lu@linux.intel.com Tested-by: Nicolin Chen nicolinc@nvidia.com Signed-off-by: Yi Liu yi.l.liu@intel.com Signed-off-by: Jason Gunthorpe jgg@nvidia.com
Reviewed-by: Kevin Tian kevin.tian@intel.com