Home
last modified time | relevance | path

Searched refs:cap_iovas (Results 1 – 2 of 2) sorted by relevance

/openbmc/linux/drivers/iommu/iommufd/
H A Dvfio_compat.c385 struct vfio_iommu_type1_info_cap_iova_range cap_iovas = { in iommufd_fill_cap_iova() local
401 if (avail >= struct_size(&cap_iovas, iova_ranges, in iommufd_fill_cap_iova()
402 cap_iovas.nr_iovas + 1) && in iommufd_fill_cap_iova()
403 copy_to_user(&ucap_iovas->iova_ranges[cap_iovas.nr_iovas], in iommufd_fill_cap_iova()
406 cap_iovas.nr_iovas++; in iommufd_fill_cap_iova()
408 if (avail >= struct_size(&cap_iovas, iova_ranges, cap_iovas.nr_iovas) && in iommufd_fill_cap_iova()
409 copy_to_user(ucap_iovas, &cap_iovas, sizeof(cap_iovas))) in iommufd_fill_cap_iova()
411 return struct_size(&cap_iovas, iova_ranges, cap_iovas.nr_iovas); in iommufd_fill_cap_iova()
/openbmc/linux/drivers/vfio/
H A Dvfio_iommu_type1.c2687 iova_cap->nr_iovas = cap_iovas->nr_iovas; in vfio_iommu_iova_add_cap()
2688 memcpy(iova_cap->iova_ranges, cap_iovas->iova_ranges, in vfio_iommu_iova_add_cap()
2689 cap_iovas->nr_iovas * sizeof(*cap_iovas->iova_ranges)); in vfio_iommu_iova_add_cap()
2712 size = struct_size(cap_iovas, iova_ranges, iovas); in vfio_iommu_iova_build_caps()
2714 cap_iovas = kzalloc(size, GFP_KERNEL); in vfio_iommu_iova_build_caps()
2715 if (!cap_iovas) in vfio_iommu_iova_build_caps()
2718 cap_iovas->nr_iovas = iovas; in vfio_iommu_iova_build_caps()
2721 cap_iovas->iova_ranges[i].start = iova->start; in vfio_iommu_iova_build_caps()
2722 cap_iovas->iova_ranges[i].end = iova->end; in vfio_iommu_iova_build_caps()
2726 ret = vfio_iommu_iova_add_cap(caps, cap_iovas, size); in vfio_iommu_iova_build_caps()
[all …]