vfio: fix build with Linux < 4.0
authorJeff Guo <jia.guo@intel.com>
Tue, 16 Oct 2018 11:42:33 +0000 (19:42 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 16 Oct 2018 12:54:25 +0000 (14:54 +0200)
commitcda94419964ff5874f84b2564cb904f2d16d58c6
tree9b248c846ae687df2fc0b05d85a53aebd8f5136a
parentc115fd000c32feda84cc9e47dc8e1420d01da4c2
vfio: fix build with Linux < 4.0

Since the older kernel version do not implement the device request
interface for vfio, so when build on the kernel < v4.0.0, which is
the version begin to add the device request interface, it will
throw the error to show “VFIO_PCI_REQ_IRQ_INDEX” is undeclared.
This patch aim to fix this compile issue by add the macro
“HAVE_VFIO_DEV_REQ_INTERFACE” after checking the kernel version.

Fixes: 0eb8a1c4c786 ("vfio: add request notifier interrupt")
Fixes: c115fd000c32 ("vfio: handle hotplug request notifier")

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/bus/pci/linux/pci_vfio.c
drivers/bus/pci/pci_common.c
lib/librte_eal/common/include/rte_vfio.h
lib/librte_eal/linuxapp/eal/eal_interrupts.c