/qemu/include/system/ |
H A D | host_iommu_device.h | 83 bool (*realize)(HostIOMMUDevice *hiod, void *opaque, Error **errp); 100 int (*get_cap)(HostIOMMUDevice *hiod, int cap, Error **errp); 107 GList* (*get_iova_ranges)(HostIOMMUDevice *hiod); 115 uint64_t (*get_page_size_mask)(HostIOMMUDevice *hiod);
|
/qemu/backends/ |
H A D | host_iommu_device.c | 30 HostIOMMUDevice *hiod = HOST_IOMMU_DEVICE(obj); in host_iommu_device_finalize() local 32 g_free(hiod->name); in host_iommu_device_finalize()
|
H A D | iommufd.c | 370 static int hiod_iommufd_get_cap(HostIOMMUDevice *hiod, int cap, Error **errp) in hiod_iommufd_get_cap() argument 372 HostIOMMUDeviceCaps *caps = &hiod->caps; in hiod_iommufd_get_cap() 378 return vfio_device_get_aw_bits(hiod->agent); in hiod_iommufd_get_cap() 380 error_setg(errp, "%s: unsupported capability %x", hiod->name, cap); in hiod_iommufd_get_cap()
|
/qemu/hw/vfio/ |
H A D | device.c | 375 HostIOMMUDevice *hiod; in vfio_device_hiod_create_and_realize() local 381 hiod = HOST_IOMMU_DEVICE(object_new(typename)); in vfio_device_hiod_create_and_realize() 383 if (!HOST_IOMMU_DEVICE_GET_CLASS(hiod)->realize(hiod, vbasedev, errp)) { in vfio_device_hiod_create_and_realize() 384 object_unref(hiod); in vfio_device_hiod_create_and_realize() 388 vbasedev->hiod = hiod; in vfio_device_hiod_create_and_realize()
|
H A D | iommufd.c | 646 object_unref(vbasedev->hiod); in iommufd_cdev_detach() 836 static bool hiod_iommufd_vfio_realize(HostIOMMUDevice *hiod, void *opaque, in hiod_iommufd_vfio_realize() argument 841 HostIOMMUDeviceCaps *caps = &hiod->caps; in hiod_iommufd_vfio_realize() 846 hiod->agent = opaque; in hiod_iommufd_vfio_realize() 854 hiod->name = g_strdup(vdev->name); in hiod_iommufd_vfio_realize() 858 idev = HOST_IOMMU_DEVICE_IOMMUFD(hiod); in hiod_iommufd_vfio_realize() 867 hiod_iommufd_vfio_get_iova_ranges(HostIOMMUDevice *hiod) in hiod_iommufd_vfio_get_iova_ranges() argument 869 VFIODevice *vdev = hiod->agent; in hiod_iommufd_vfio_get_iova_ranges() 876 hiod_iommufd_vfio_get_page_size_mask(HostIOMMUDevice *hiod) in hiod_iommufd_vfio_get_page_size_mask() argument 878 VFIODevice *vdev = hiod->agent; in hiod_iommufd_vfio_get_page_size_mask()
|
H A D | container.c | 960 object_unref(vbasedev->hiod); in vfio_legacy_detach_device() 1147 static bool hiod_legacy_vfio_realize(HostIOMMUDevice *hiod, void *opaque, in hiod_legacy_vfio_realize() argument 1152 hiod->name = g_strdup(vdev->name); in hiod_legacy_vfio_realize() 1153 hiod->agent = opaque; in hiod_legacy_vfio_realize() 1158 static int hiod_legacy_vfio_get_cap(HostIOMMUDevice *hiod, int cap, in hiod_legacy_vfio_get_cap() argument 1163 return vfio_device_get_aw_bits(hiod->agent); in hiod_legacy_vfio_get_cap() 1165 error_setg(errp, "%s: unsupported capability %x", hiod->name, cap); in hiod_legacy_vfio_get_cap() 1171 hiod_legacy_vfio_get_iova_ranges(HostIOMMUDevice *hiod) in hiod_legacy_vfio_get_iova_ranges() argument 1173 VFIODevice *vdev = hiod->agent; in hiod_legacy_vfio_get_iova_ranges() 1180 hiod_legacy_vfio_get_page_size_mask(HostIOMMUDevice *hiod) in hiod_legacy_vfio_get_page_size_mask() argument [all …]
|
H A D | pci.c | 3226 !pci_device_set_iommu_device(pdev, vbasedev->hiod, errp)) { in vfio_pci_realize()
|
/qemu/hw/virtio/ |
H A D | virtio-iommu.c | 622 HostIOMMUDevice *hiod, Error **errp) in virtio_iommu_set_iommu_device() argument 626 HostIOMMUDeviceClass *hiodc = HOST_IOMMU_DEVICE_GET_CLASS(hiod); in virtio_iommu_set_iommu_device() 630 assert(hiod); in virtio_iommu_set_iommu_device() 639 host_iova_ranges = hiodc->get_iova_ranges(hiod); in virtio_iommu_set_iommu_device() 643 ret = virtio_iommu_set_host_iova_ranges(viommu, hiod->aliased_bus, in virtio_iommu_set_iommu_device() 644 hiod->aliased_devfn, in virtio_iommu_set_iommu_device() 651 uint64_t new_mask = hiodc->get_page_size_mask(hiod); in virtio_iommu_set_iommu_device() 660 trace_virtio_iommu_update_page_size_mask(hiod->name, in virtio_iommu_set_iommu_device() 667 error_prepend(errp, "%s: ", hiod->name); in virtio_iommu_set_iommu_device() 676 object_ref(hiod); in virtio_iommu_set_iommu_device() [all …]
|
/qemu/include/hw/vfio/ |
H A D | vfio-device.h | 81 HostIOMMUDevice *hiod; member
|
/qemu/hw/i386/ |
H A D | intel_iommu.c | 4328 static bool vtd_check_hiod(IntelIOMMUState *s, HostIOMMUDevice *hiod, in vtd_check_hiod() argument 4331 HostIOMMUDeviceClass *hiodc = HOST_IOMMU_DEVICE_GET_CLASS(hiod); in vtd_check_hiod() 4340 ret = hiodc->get_cap(hiod, HOST_IOMMU_DEVICE_CAP_AW_BITS, errp); in vtd_check_hiod() 4359 HostIOMMUDevice *hiod, Error **errp) in vtd_dev_set_iommu_device() argument 4368 assert(hiod); in vtd_dev_set_iommu_device() 4378 if (!vtd_check_hiod(s, hiod, errp)) { in vtd_dev_set_iommu_device() 4387 object_ref(hiod); in vtd_dev_set_iommu_device() 4388 g_hash_table_insert(s->vtd_host_iommu_dev, new_key, hiod); in vtd_dev_set_iommu_device()
|
/qemu/hw/pci/ |
H A D | pci.c | 2959 bool pci_device_set_iommu_device(PCIDevice *dev, HostIOMMUDevice *hiod, in pci_device_set_iommu_device() argument 2969 hiod->aliased_bus = aliased_bus; in pci_device_set_iommu_device() 2970 hiod->aliased_devfn = aliased_devfn; in pci_device_set_iommu_device() 2973 dev->devfn, hiod, errp); in pci_device_set_iommu_device()
|
/qemu/include/hw/pci/ |
H A D | pci.h | 630 bool pci_device_set_iommu_device(PCIDevice *dev, HostIOMMUDevice *hiod,
|