On Fri, Oct 25, 2024 at 08:59:11AM +0000, Tian, Kevin wrote:
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?
Oh, core-managed vIOMMU is gone since this version. I should have updated the commit message here too.
+/**
- 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.
Yea, let's do this: * Allocate a virtual IOMMU object, representing the underlying physical IOMMU's * virtualization support that is a security-isolated slice of the real IOMMU HW * that is unique to a specific VM.
Thanks Nicolin