From: Nicolin Chen nicolinc@nvidia.com Sent: Tuesday, October 22, 2024 8:19 AM
Add a new ioctl for user space to do a vIOMMU allocation. It must be based on a nesting parent HWPT, so take its refcount.
If an IOMMU driver supports a driver-managed vIOMMU object, it must define
why highlight 'driver-managed', implying a core-managed vIOMMU object some day?
+/**
- struct iommu_viommu_alloc - ioctl(IOMMU_VIOMMU_ALLOC)
- @size: sizeof(struct iommu_viommu_alloc)
- @flags: Must be 0
- @type: Type of the virtual IOMMU. Must be defined in enum
iommu_viommu_type
- @dev_id: The device's physical IOMMU will be used to back the virtual
IOMMU
- @hwpt_id: ID of a nesting parent HWPT to associate to
- @out_viommu_id: Output virtual IOMMU ID for the allocated object
- Allocate a virtual IOMMU object that represents the underlying physical
- IOMMU's virtualization support. The vIOMMU object is a security-isolated
- slice of the physical IOMMU HW that is unique to a specific VM.
the object itself is a software abstraction, while a 'slice' is a set of real hw resources.