diff options
author | Nicolin Chen <nicolinc@nvidia.com> | 2024-11-05 23:05:09 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2024-11-12 18:46:18 +0300 |
commit | 0ce5c2477af2e2284b9c70474e4dae85db211680 (patch) | |
tree | 75e636f16a91bbc272e0735182564b7da5a36658 /tools/perf/scripts/python/stackcollapse.py | |
parent | 87210b100e498c2073a283cb7a6f495fac5b4713 (diff) | |
download | linux-0ce5c2477af2e2284b9c70474e4dae85db211680.tar.xz |
iommufd/viommu: Add IOMMUFD_OBJ_VDEVICE and IOMMU_VDEVICE_ALLOC ioctl
Introduce a new IOMMUFD_OBJ_VDEVICE to represent a physical device (struct
device) against a vIOMMU (struct iommufd_viommu) object in a VM.
This vDEVICE object (and its structure) holds all the infos and attributes
in the VM, regarding the device related to the vIOMMU.
As an initial patch, add a per-vIOMMU virtual ID. This can be:
- Virtual StreamID on a nested ARM SMMUv3, an index to a Stream Table
- Virtual DeviceID on a nested AMD IOMMU, an index to a Device Table
- Virtual RID on a nested Intel VT-D IOMMU, an index to a Context Table
Potentially, this vDEVICE structure would hold some vData for Confidential
Compute Architecture (CCA). Use this virtual ID to index an "vdevs" xarray
that belongs to a vIOMMU object.
Add a new ioctl for vDEVICE allocations. Since a vDEVICE is a connection
of a device object and an iommufd_viommu object, take two refcounts in the
ioctl handler.
Link: https://patch.msgid.link/r/cda8fd2263166e61b8191a3b3207e0d2b08545bf.1730836308.git.nicolinc@nvidia.com
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions