bus/pci: always check IOMMU capabilities
authorDavid Marchand <david.marchand@redhat.com>
Mon, 5 Aug 2019 06:23:26 +0000 (08:23 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 5 Aug 2019 10:08:15 +0000 (12:08 +0200)
commit66d3724b2c87e6fcdf3851ca191683696a91b901
tree886cd2963e64f4fd5aec51c6530274e88949d5e5
parentb62f3aff913daff969bb88cded19f41ed98da772
bus/pci: always check IOMMU capabilities

IOMMU capabilities won't change and must be checked even if no PCI device
seem to be supported yet when EAL initialised.

This is to accommodate with SPDK that registers its drivers after
rte_eal_init(), especially on PPC platform where the IOMMU does not
support VA.

Fixes: 703458e19c16 ("bus/pci: consider only usable devices for IOVA mode")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Takeshi Yoshimura <tyos@jp.ibm.com>
drivers/bus/pci/bsd/pci.c
drivers/bus/pci/linux/pci.c
drivers/bus/pci/pci_common.c
drivers/bus/pci/private.h