Kernel headers define VFIO_IOMMU_INFO_PGSIZES flag, however it has actually been never used, probably by mistake which now became a part of the ABI. The kernel always sets info.flags to 0:
http://lxr.free-electrons.com/source/drivers/vfio/vfio_iommu_type1.c?v=3.7#L675 http://lxr.free-electrons.com/source/drivers/vfio/vfio_iommu_type1.c#L974 Signed-off-by: Pavel Fedin <p.fe...@samsung.com> --- hw/vfio/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 6797208..afc10c7 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -704,7 +704,7 @@ static int vfio_connect_container(VFIOGroup *group, AddressSpace *as) info.argsz = sizeof(info); ret = ioctl(fd, VFIO_IOMMU_GET_INFO, &info); /* Ignore errors */ - if ((ret == 0) && (info.flags & VFIO_IOMMU_INFO_PGSIZES)) { + if (ret == 0) { container->iova_pgsizes = info.iova_pgsizes; } } else if (ioctl(fd, VFIO_CHECK_EXTENSION, VFIO_SPAPR_TCE_IOMMU)) { -- 1.9.5.msysgit.0