/linux-6.14.4/drivers/iommu/iommufd/ |
D | viommu.c | 8 struct iommufd_viommu *viommu = in iommufd_viommu_destroy() local 11 if (viommu->ops && viommu->ops->destroy) in iommufd_viommu_destroy() 12 viommu->ops->destroy(viommu); in iommufd_viommu_destroy() 13 refcount_dec(&viommu->hwpt->common.obj.users); in iommufd_viommu_destroy() 14 xa_destroy(&viommu->vdevs); in iommufd_viommu_destroy() 21 struct iommufd_viommu *viommu; in iommufd_viommu_alloc_ioctl() local 50 viommu = ops->viommu_alloc(idev->dev, hwpt_paging->common.domain, in iommufd_viommu_alloc_ioctl() 52 if (IS_ERR(viommu)) { in iommufd_viommu_alloc_ioctl() 53 rc = PTR_ERR(viommu); in iommufd_viommu_alloc_ioctl() 57 xa_init(&viommu->vdevs); in iommufd_viommu_alloc_ioctl() [all …]
|
D | hw_pagetable.c | 60 if (hwpt_nested->viommu) in iommufd_hwpt_nested_destroy() 61 refcount_dec(&hwpt_nested->viommu->obj.users); in iommufd_hwpt_nested_destroy() 267 * iommufd_viommu_alloc_hwpt_nested() - Get a hwpt_nested for a vIOMMU 268 * @viommu: vIOMMU ojbect to associate the hwpt_nested/domain with 272 * Allocate a new IOMMU_DOMAIN_NESTED for a vIOMMU and return it as a NESTED 276 iommufd_viommu_alloc_hwpt_nested(struct iommufd_viommu *viommu, u32 flags, in iommufd_viommu_alloc_hwpt_nested() argument 287 if (!viommu->ops || !viommu->ops->alloc_domain_nested) in iommufd_viommu_alloc_hwpt_nested() 291 viommu->ictx, hwpt_nested, IOMMUFD_OBJ_HWPT_NESTED, common.obj); in iommufd_viommu_alloc_hwpt_nested() 296 hwpt_nested->viommu = viommu; in iommufd_viommu_alloc_hwpt_nested() 297 refcount_inc(&viommu->obj.users); in iommufd_viommu_alloc_hwpt_nested() [all …]
|
D | driver.c | 39 /* Caller should xa_lock(&viommu->vdevs) to protect the return value */ 40 struct device *iommufd_viommu_find_dev(struct iommufd_viommu *viommu, in iommufd_viommu_find_dev() argument 45 lockdep_assert_held(&viommu->vdevs.xa_lock); in iommufd_viommu_find_dev() 47 vdev = xa_load(&viommu->vdevs, vdev_id); in iommufd_viommu_find_dev()
|
D | selftest.c | 153 static inline struct mock_viommu *to_mock_viommu(struct iommufd_viommu *viommu) in to_mock_viommu() argument 155 return container_of(viommu, struct mock_viommu, core); in to_mock_viommu() 570 static void mock_viommu_destroy(struct iommufd_viommu *viommu) in mock_viommu_destroy() argument 573 viommu->iommu_dev, struct mock_iommu_device, iommu_dev); in mock_viommu_destroy() 578 /* iommufd core frees mock_viommu and viommu */ in mock_viommu_destroy() 582 mock_viommu_alloc_domain_nested(struct iommufd_viommu *viommu, u32 flags, in mock_viommu_alloc_domain_nested() argument 585 struct mock_viommu *mock_viommu = to_mock_viommu(viommu); in mock_viommu_alloc_domain_nested() 599 static int mock_viommu_cache_invalidate(struct iommufd_viommu *viommu, in mock_viommu_cache_invalidate() argument 642 xa_lock(&viommu->vdevs); in mock_viommu_cache_invalidate() 643 dev = iommufd_viommu_find_dev(viommu, in mock_viommu_cache_invalidate() [all …]
|
D | Makefile | 11 viommu.o
|
D | iommufd_private.h | 295 struct iommufd_viommu *viommu; member 528 struct iommufd_viommu *viommu; member 530 u64 id; /* per-vIOMMU virtual ID */
|
D | iommufd_test.h | 201 * struct iommu_viommu_invalidate_selftest - Invalidation data for Mock VIOMMU
|
D | main.c | 312 struct iommu_viommu_alloc viommu; member
|
/linux-6.14.4/drivers/iommu/ |
D | virtio-iommu.c | 64 struct viommu_dev *viommu; member 65 struct mutex mutex; /* protects viommu pointer */ 78 struct viommu_dev *viommu; member 136 static off_t viommu_get_write_desc_offset(struct viommu_dev *viommu, in viommu_get_write_desc_offset() argument 143 return len - viommu->probe_size - tail_size; in viommu_get_write_desc_offset() 154 static int __viommu_sync_req(struct viommu_dev *viommu) in __viommu_sync_req() argument 159 struct virtqueue *vq = viommu->vqs[VIOMMU_REQUEST_VQ]; in __viommu_sync_req() 161 assert_spin_locked(&viommu->request_lock); in __viommu_sync_req() 165 while (!list_empty(&viommu->requests)) { in __viommu_sync_req() 187 static int viommu_sync_req(struct viommu_dev *viommu) in viommu_sync_req() argument [all …]
|
/linux-6.14.4/drivers/acpi/ |
D | viot.c | 48 struct viot_iommu *viommu; member 77 static int __init viot_get_pci_iommu_fwnode(struct viot_iommu *viommu, in viot_get_pci_iommu_fwnode() argument 103 viommu->fwnode = dev_fwnode(&pdev->dev); in viot_get_pci_iommu_fwnode() 108 static int __init viot_get_mmio_iommu_fwnode(struct viot_iommu *viommu, in viot_get_mmio_iommu_fwnode() argument 123 viommu->fwnode = &adev->fwnode; in viot_get_mmio_iommu_fwnode() 130 struct viot_iommu *viommu; in viot_get_iommu() local 138 list_for_each_entry(viommu, &viot_iommus, list) in viot_get_iommu() 139 if (viommu->offset == offset) in viot_get_iommu() 140 return viommu; in viot_get_iommu() 145 viommu = kzalloc(sizeof(*viommu), GFP_KERNEL); in viot_get_iommu() [all …]
|
/linux-6.14.4/Documentation/userspace-api/ |
D | iommufd.rst | 78 Such a vIOMMU object generally has the access to a nesting parent pagetable 79 to support some HW-accelerated virtualization features. So, a vIOMMU object 81 encapsulate that HWPT_PAGING object. Therefore, a vIOMMU object can be used 86 The name "vIOMMU" isn't necessarily identical to a virtualized IOMMU in a 90 vIOMMU objects created for individual slices of different physical IOMMUs. 91 In other words, a vIOMMU object is always a representation of one physical 96 backed by corresponding vIOMMU objects, in which case a guest OS would do 101 information or attributes (related to the vIOMMU) in a VM. An immediate vDATA 102 example can be the virtual ID of the device on a vIOMMU, which is a unique ID 103 that VMM assigns to the device for a translation channel/port of the vIOMMU, [all …]
|
/linux-6.14.4/include/linux/ |
D | iommufd.h | 101 * struct iommufd_viommu_ops - vIOMMU specific operations 103 * of the vIOMMU will be free-ed by iommufd core after calling this op 104 * @alloc_domain_nested: Allocate a IOMMU_DOMAIN_NESTED on a vIOMMU that holds a 109 * @cache_invalidate: Flush hardware cache used by a vIOMMU. It can be used for 118 void (*destroy)(struct iommufd_viommu *viommu); 120 struct iommufd_viommu *viommu, u32 flags, 122 int (*cache_invalidate)(struct iommufd_viommu *viommu, 188 struct device *iommufd_viommu_find_dev(struct iommufd_viommu *viommu, 199 iommufd_viommu_find_dev(struct iommufd_viommu *viommu, unsigned long vdev_id) in iommufd_viommu_find_dev() argument
|
/linux-6.14.4/include/uapi/linux/ |
D | iommufd.h | 470 * @pt_id: The IOAS or HWPT or vIOMMU to connect this HWPT to 489 * A user-managed nested HWPT will be created from a given vIOMMU (wrapping a 494 * via @dev_id and the vIOMMU via @pt_id must be associated to the same IOMMU 783 * Supported command list only when passing in a vIOMMU via @hwpt_id: 802 * @hwpt_id: ID of a nested HWPT or a vIOMMU, for cache invalidation 813 * Invalidate iommu cache for user-managed page table or vIOMMU. Modifications 816 * cache can be flushed if a vIOMMU is passed in via the @hwpt_id field. 956 * to the vIOMMU, such as: 978 * @viommu_id: vIOMMU ID to associate with the virtual device 979 * @dev_id: The physical device to allocate a virtual instance on the vIOMMU [all …]
|
/linux-6.14.4/Documentation/devicetree/bindings/virtio/ |
D | mmio.yaml | 56 iommus = <&viommu 23>; 59 viommu: iommu@3100 {
|
/linux-6.14.4/drivers/iommu/arm/arm-smmu-v3/ |
D | arm-smmu-v3-iommufd.c | 177 arm_vsmmu_alloc_domain_nested(struct iommufd_viommu *viommu, u32 flags, in arm_vsmmu_alloc_domain_nested() argument 180 struct arm_vsmmu *vsmmu = container_of(viommu, struct arm_vsmmu, core); in arm_vsmmu_alloc_domain_nested() 287 static int arm_vsmmu_cache_invalidate(struct iommufd_viommu *viommu, in arm_vsmmu_cache_invalidate() argument 290 struct arm_vsmmu *vsmmu = container_of(viommu, struct arm_vsmmu, core); in arm_vsmmu_cache_invalidate()
|
/linux-6.14.4/tools/testing/selftests/iommu/ |
D | iommufd.c | 2644 unsigned int viommu; in FIXTURE_VARIANT() local 2654 if (variant->viommu) { in FIXTURE_SETUP() 2667 /* Allocate a vIOMMU taking refcount of the parent hwpt */ in FIXTURE_SETUP() 2687 .viommu = 0, in FIXTURE_VARIANT_ADD() 2692 .viommu = 1, in FIXTURE_VARIANT_ADD() 2716 /* Negative test -- unsupported viommu type */ in TEST_F()
|
D | iommufd_utils.h | 331 #define test_cmd_viommu_invalidate(viommu, reqs, lreq, nreqs) \ argument 334 _test_cmd_viommu_invalidate(self->fd, viommu, reqs, \
|
/linux-6.14.4/drivers/iommu/amd/ |
D | iommu.c | 1666 * When NpCache is on, we infer that we run in a VM and use a vIOMMU. in amd_iommu_domain_flush_pages()
|