Thread (25 messages) 25 messages, 4 authors, 2016-01-28

Re: [PATCH v6] vfio: Support for no-IOMMU mode

From: Burakov, Anatoly <hidden>
Date: 2016-01-28 15:00:27

quoted
Hi Thomas,
quoted
2016-01-28 11:57, Anatoly Burakov:
quoted
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0)
Why not #ifndef VFIO_NOIOMMU_IOMMU?
It would avoid some backport issue.
I don't see how it could. Versions post-4.5 will have
VFIO_NOIOMMU_IOMMU, so no issue there. Pre-4.5 versions, whether
they do or do not have VFIO_NOIOMMU_IOMMU defined, will have
RTE_VFIO_NOIOMMU defined as 8 regardless.

Are we sure it will ever be backported as 8?
Anyway I think it's better to avoid version number checks.
Is there a precedent of kernel API definitions ever changing in backports? Presumably whoever backports the changes is interested in making them as compatible as possible, so I believe it's a safe bet to make. I have no strong opinion for or against this way of doing things, but if we're taking issue with kernel version checks, we probably should also adapt all the other stuff in the eal_vfio.h that does things in the exact same manner.
What happens if the feature is reverted from 4.5 as it was from 4.4?
Well then we have to wait until NOIOMMU makes it into official kernel before applying this patch. There's nothing we can do about that. If the patch gets reverted, then defining NOIOMMU as 8 will be wrong regardless of whether there's a kernel version check.

Thanks,
Anatoly
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help