vfio: avoid enabling while the module is not loaded
authorMichael Qiu <michael.qiu@intel.com>
Wed, 10 Dec 2014 11:46:17 +0000 (19:46 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 15 Jan 2015 12:41:39 +0000 (13:41 +0100)
commit021d935a038495f8db02be48b6683d92b3401501
tree1c5b0800154b900bcb0706cabb07423a7ebaaca8
parent985cba0c5c137a29e3fad8c400794ae71cb828a4
vfio: avoid enabling while the module is not loaded

When vfio module is not loaded when kernel support vfio feature,
the routine still try to open the container to get file
description.

This action is not safe, and of course got error messages:

EAL: Detected 40 lcore(s)
EAL:   unsupported IOMMU type!
EAL: VFIO support could not be initialized
EAL: Setting up memory...

This may make user confuse, this patch make it reasonable
and much more smooth to user.

Signed-off-by: Michael Qiu <michael.qiu@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
lib/librte_eal/common/eal_private.h
lib/librte_eal/linuxapp/eal/eal.c
lib/librte_eal/linuxapp/eal/eal_pci_vfio.c