Home
last modified time | relevance | path

Searched refs:hiod (Results 1 – 13 of 13) sorted by relevance

/openbmc/qemu/include/sysemu/
H A Dhost_iommu_device.h68 bool (*realize)(HostIOMMUDevice *hiod, void *opaque, Error **errp);
85 int (*get_cap)(HostIOMMUDevice *hiod, int cap, Error **errp);
92 GList* (*get_iova_ranges)(HostIOMMUDevice *hiod);
100 uint64_t (*get_page_size_mask)(HostIOMMUDevice *hiod);
/openbmc/qemu/backends/
H A Dhost_iommu_device.c30 HostIOMMUDevice *hiod = HOST_IOMMU_DEVICE(obj); in host_iommu_device_finalize() local
32 g_free(hiod->name); in host_iommu_device_finalize()
H A Diommufd.c317 static int hiod_iommufd_get_cap(HostIOMMUDevice *hiod, int cap, Error **errp) in hiod_iommufd_get_cap() argument
319 HostIOMMUDeviceCaps *caps = &hiod->caps; in hiod_iommufd_get_cap()
325 return vfio_device_get_aw_bits(hiod->agent); in hiod_iommufd_get_cap()
327 error_setg(errp, "%s: unsupported capability %x", hiod->name, cap); in hiod_iommufd_get_cap()
/openbmc/qemu/hw/vfio/
H A Diommufd.c321 if (vbasedev->hiod->caps.hw_caps & IOMMU_HW_CAP_DIRTY_TRACKING) { in iommufd_cdev_autodomains_get()
804 static bool hiod_iommufd_vfio_realize(HostIOMMUDevice *hiod, void *opaque, in hiod_iommufd_vfio_realize() argument
808 HostIOMMUDeviceCaps *caps = &hiod->caps; in hiod_iommufd_vfio_realize()
815 hiod->agent = opaque; in hiod_iommufd_vfio_realize()
823 hiod->name = g_strdup(vdev->name); in hiod_iommufd_vfio_realize()
831 hiod_iommufd_vfio_get_iova_ranges(HostIOMMUDevice *hiod) in hiod_iommufd_vfio_get_iova_ranges() argument
833 VFIODevice *vdev = hiod->agent; in hiod_iommufd_vfio_get_iova_ranges()
840 hiod_iommufd_vfio_get_page_size_mask(HostIOMMUDevice *hiod) in hiod_iommufd_vfio_get_page_size_mask() argument
842 VFIODevice *vdev = hiod->agent; in hiod_iommufd_vfio_get_page_size_mask()
H A Dcontainer.c1142 static bool hiod_legacy_vfio_realize(HostIOMMUDevice *hiod, void *opaque, in hiod_legacy_vfio_realize() argument
1147 hiod->name = g_strdup(vdev->name); in hiod_legacy_vfio_realize()
1148 hiod->agent = opaque; in hiod_legacy_vfio_realize()
1153 static int hiod_legacy_vfio_get_cap(HostIOMMUDevice *hiod, int cap, in hiod_legacy_vfio_get_cap() argument
1158 return vfio_device_get_aw_bits(hiod->agent); in hiod_legacy_vfio_get_cap()
1160 error_setg(errp, "%s: unsupported capability %x", hiod->name, cap); in hiod_legacy_vfio_get_cap()
1166 hiod_legacy_vfio_get_iova_ranges(HostIOMMUDevice *hiod) in hiod_legacy_vfio_get_iova_ranges() argument
1168 VFIODevice *vdev = hiod->agent; in hiod_legacy_vfio_get_iova_ranges()
1175 hiod_legacy_vfio_get_page_size_mask(HostIOMMUDevice *hiod) in hiod_legacy_vfio_get_page_size_mask() argument
1177 VFIODevice *vdev = hiod->agent; in hiod_legacy_vfio_get_page_size_mask()
H A Dhelpers.c695 HostIOMMUDevice *hiod = vbasedev->hiod; in vfio_device_hiod_realize() local
697 if (!hiod) { in vfio_device_hiod_realize()
701 return HOST_IOMMU_DEVICE_GET_CLASS(hiod)->realize(hiod, vbasedev, errp); in vfio_device_hiod_realize()
H A Dcommon.c1543 HostIOMMUDevice *hiod = NULL; in vfio_attach_device() local
1553 hiod = HOST_IOMMU_DEVICE(object_new(ops->hiod_typename)); in vfio_attach_device()
1554 vbasedev->hiod = hiod; in vfio_attach_device()
1558 object_unref(hiod); in vfio_attach_device()
1559 vbasedev->hiod = NULL; in vfio_attach_device()
1571 object_unref(vbasedev->hiod); in vfio_detach_device()
H A Dpci.c3119 !pci_device_set_iommu_device(pdev, vbasedev->hiod, errp)) { in vfio_realize()
/openbmc/qemu/hw/virtio/
H A Dvirtio-iommu.c630 assert(hiod); in virtio_iommu_set_iommu_device()
639 host_iova_ranges = hiodc->get_iova_ranges(hiod); 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()
690 HostIOMMUDevice *hiod; in virtio_iommu_unset_iommu_device() local
696 hiod = g_hash_table_lookup(viommu->host_iommu_devices, &key); in virtio_iommu_unset_iommu_device()
697 if (!hiod) { in virtio_iommu_unset_iommu_device()
700 virtio_iommu_unset_host_iova_ranges(viommu, hiod->aliased_bus, in virtio_iommu_unset_iommu_device()
[all …]
/openbmc/qemu/include/hw/vfio/
H A Dvfio-common.h145 HostIOMMUDevice *hiod; member
/openbmc/qemu/hw/i386/
H A Dintel_iommu.c3851 static bool vtd_check_hiod(IntelIOMMUState *s, HostIOMMUDevice *hiod, in vtd_check_hiod() argument
3854 HostIOMMUDeviceClass *hiodc = HOST_IOMMU_DEVICE_GET_CLASS(hiod); in vtd_check_hiod()
3863 ret = hiodc->get_cap(hiod, HOST_IOMMU_DEVICE_CAP_AW_BITS, errp); in vtd_check_hiod()
3876 HostIOMMUDevice *hiod, Error **errp) in vtd_dev_set_iommu_device() argument
3885 assert(hiod); in vtd_dev_set_iommu_device()
3895 if (!vtd_check_hiod(s, hiod, errp)) { in vtd_dev_set_iommu_device()
3904 object_ref(hiod); in vtd_dev_set_iommu_device()
3905 g_hash_table_insert(s->vtd_host_iommu_dev, new_key, hiod); in vtd_dev_set_iommu_device()
/openbmc/qemu/include/hw/pci/
H A Dpci.h423 bool pci_device_set_iommu_device(PCIDevice *dev, HostIOMMUDevice *hiod,
/openbmc/qemu/hw/pci/
H A Dpci.c2753 bool pci_device_set_iommu_device(PCIDevice *dev, HostIOMMUDevice *hiod, in pci_device_set_iommu_device() argument
2763 hiod->aliased_bus = aliased_bus; in pci_device_set_iommu_device()
2764 hiod->aliased_devfn = aliased_devfn; in pci_device_set_iommu_device()
2767 dev->devfn, hiod, errp); in pci_device_set_iommu_device()