#ifndef _RTE_VFIO_H_
#define _RTE_VFIO_H_
+/*
+ * determine if VFIO is present on the system
+ */
+#if !defined(VFIO_PRESENT) && defined(RTE_EAL_VFIO)
+#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
+#define VFIO_PRESENT
+#endif /* kernel version >= 3.6.0 */
+#endif /* RTE_EAL_VFIO */
+
+#ifdef VFIO_PRESENT
+
#include <linux/vfio.h>
#define VFIO_DIR "/dev/vfio"
*/
int vfio_noiommu_is_enabled(void);
+#endif /* VFIO_PRESENT */
+
#endif /* _RTE_VFIO_H_ */