@@ -311,28 +311,6 @@ bool iommufd_backend_get_device_info(IOMMUFDBackend *be, uint32_t devid,
return true;
}
-static int hiod_iommufd_get_cap(HostIOMMUDevice *hiod, int cap, Error **errp)
-{
- HostIOMMUDeviceCaps *caps = &hiod->caps;
-
- switch (cap) {
- case HOST_IOMMU_DEVICE_CAP_IOMMU_TYPE:
- return caps->type;
- case HOST_IOMMU_DEVICE_CAP_AW_BITS:
- return vfio_device_get_aw_bits(hiod->agent);
- default:
- error_setg(errp, "%s: unsupported capability %x", hiod->name, cap);
- return -EINVAL;
- }
-}
-
-static void hiod_iommufd_class_init(ObjectClass *oc, void *data)
-{
- HostIOMMUDeviceClass *hioc = HOST_IOMMU_DEVICE_CLASS(oc);
-
- hioc->get_cap = hiod_iommufd_get_cap;
-};
-
static const TypeInfo types[] = {
{
.name = TYPE_IOMMUFD_BACKEND,
@@ -349,7 +327,6 @@ static const TypeInfo types[] = {
}, {
.name = TYPE_HOST_IOMMU_DEVICE_IOMMUFD,
.parent = TYPE_HOST_IOMMU_DEVICE,
- .class_init = hiod_iommufd_class_init,
.abstract = true,
}
};
Because sub-class TYPE_HOST_IOMMU_DEVICE_IOMMUFD_VFIO has it's own implementation of .get_cap(), hiod_iommufd_get_cap() isn't used any more, drop it. Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com> --- backends/iommufd.c | 23 ----------------------- 1 file changed, 23 deletions(-)