Home
last modified time | relevance | path

Searched full:viommu (Results 1 – 11 of 11) sorted by relevance

/linux/drivers/iommu/iommufd/
H A Dviommu.c8 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()
26 struct iommufd_viommu *viommu; in iommufd_viommu_alloc_ioctl() local
53 * vIOMMU structure size in iommufd_viommu_alloc_ioctl()
55 if (WARN_ON_ONCE(viommu_size < sizeof(*viommu))) { in iommufd_viommu_alloc_ioctl()
71 viommu = (struct iommufd_viommu *)_iommufd_object_alloc_ucmd( in iommufd_viommu_alloc_ioctl()
73 if (IS_ERR(viommu)) { in iommufd_viommu_alloc_ioctl()
[all …]
H A Deventq.c226 struct iommufd_viommu *viommu = veventq->viommu; in iommufd_veventq_abort() local
229 lockdep_assert_held_write(&viommu->veventqs_rwsem); in iommufd_veventq_abort()
237 refcount_dec(&viommu->obj.users); in iommufd_veventq_abort()
246 down_write(&veventq->viommu->veventqs_rwsem); in iommufd_veventq_destroy()
248 up_write(&veventq->viommu->veventqs_rwsem); in iommufd_veventq_destroy()
479 struct iommufd_viommu *viommu; in iommufd_veventq_alloc() local
489 viommu = iommufd_get_viommu(ucmd, cmd->viommu_id); in iommufd_veventq_alloc()
490 if (IS_ERR(viommu)) in iommufd_veventq_alloc()
491 return PTR_ERR(viommu); in iommufd_veventq_alloc()
493 down_write(&viommu->veventqs_rwsem); in iommufd_veventq_alloc()
[all …]
H A Diommufd_private.h383 struct iommufd_viommu *viommu; member
597 /* An iommufd_vevent represents a vIOMMU event in an iommufd_veventq */
609 * An iommufd_veventq object represents an interface to deliver vIOMMU events to
611 * a vIOMMU object during the allocations.
615 struct iommufd_viommu *viommu; member
674 iommufd_viommu_find_veventq(struct iommufd_viommu *viommu, in iommufd_viommu_find_veventq() argument
679 lockdep_assert_held(&viommu->veventqs_rwsem); in iommufd_viommu_find_veventq()
681 list_for_each_entry_safe(veventq, next, &viommu->veventqs, node) { in iommufd_viommu_find_veventq()
H A Dmain.c434 struct iommu_viommu_alloc viommu; member
/linux/drivers/iommu/
H A Dvirtio-iommu.c65 struct viommu_dev *viommu; member
77 struct viommu_dev *viommu; member
137 static off_t viommu_get_write_desc_offset(struct viommu_dev *viommu, in viommu_get_write_desc_offset() argument
144 return len - viommu->probe_size - tail_size; in viommu_get_write_desc_offset()
155 static int __viommu_sync_req(struct viommu_dev *viommu) in __viommu_sync_req() argument
160 struct virtqueue *vq = viommu->vqs[VIOMMU_REQUEST_VQ]; in __viommu_sync_req()
162 assert_spin_locked(&viommu->request_lock); in __viommu_sync_req()
166 while (!list_empty(&viommu->requests)) { in __viommu_sync_req()
188 static int viommu_sync_req(struct viommu_dev *viommu) in viommu_sync_req() argument
193 spin_lock_irqsave(&viommu->request_lock, flags); in viommu_sync_req()
[all …]
/linux/drivers/acpi/
H A Dviot.c48 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/Documentation/userspace-api/
H A Diommufd.rst85 Such a vIOMMU object generally has the access to a nesting parent pagetable
86 to support some HW-accelerated virtualization features. So, a vIOMMU object
88 encapsulate that HWPT_PAGING object. Therefore, a vIOMMU object can be used
93 The name "vIOMMU" isn't necessarily identical to a virtualized IOMMU in a
97 vIOMMU objects created for individual slices of different physical IOMMUs.
98 In other words, a vIOMMU object is always a representation of one physical
103 backed by corresponding vIOMMU objects, in which case a guest OS would do
108 information or attributes (related to the vIOMMU) in a VM. An immediate vDATA
109 example can be the virtual ID of the device on a vIOMMU, which is a unique ID
110 that VMM assigns to the device for a translation channel/port of the vIOMMU,
[all …]
/linux/Documentation/devicetree/bindings/virtio/
H A Dmmio.yaml56 iommus = <&viommu 23>;
59 viommu: iommu@3100 {
/linux/drivers/iommu/arm/arm-smmu-v3/
H A Dtegra241-cmdqv.c300 struct iommufd_viommu *viommu = &vintf->vsmmu.core; in tegra241_vintf_user_handle_error() local
310 iommufd_viommu_report_event(viommu, IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV, in tegra241_vintf_user_handle_error()
777 /* Guest-owned VINTF is free-ed with viommu by iommufd core */ in tegra241_cmdqv_remove_vintf()
1069 static size_t tegra241_vintf_get_vcmdq_size(struct iommufd_viommu *viommu, in tegra241_vintf_get_vcmdq_size() argument
1108 struct tegra241_vintf *vintf = viommu_to_vintf(hw_queue->viommu); in tegra241_vintf_alloc_lvcmdq_user()
1204 static void tegra241_cmdqv_destroy_vintf_user(struct iommufd_viommu *viommu) in tegra241_cmdqv_destroy_vintf_user() argument
1206 struct tegra241_vintf *vintf = viommu_to_vintf(viommu); in tegra241_cmdqv_destroy_vintf_user()
1231 struct tegra241_vintf *vintf = viommu_to_vintf(vdev->viommu); in tegra241_vintf_init_vsid()
/linux/tools/testing/selftests/iommu/
H A Diommufd.c2727 unsigned int viommu; in FIXTURE_VARIANT() local
2737 if (variant->viommu) { in FIXTURE_SETUP()
2750 /* Allocate a vIOMMU taking refcount of the parent hwpt */ in FIXTURE_SETUP()
2770 .viommu = 0, in FIXTURE_VARIANT_ADD()
2775 .viommu = 1, in FIXTURE_VARIANT_ADD()
2801 /* Negative test -- unsupported viommu type */ in TEST_F()
3266 /* Allocate a regular nested hwpt based on viommu */ in TEST_F()
H A Diommufd_utils.h341 #define test_cmd_viommu_invalidate(viommu, reqs, lreq, nreqs) \ argument
344 _test_cmd_viommu_invalidate(self->fd, viommu, reqs, \