bus/pci: check IO permissions for UIO only
authorDavid Marchand <david.marchand@redhat.com>
Tue, 22 Oct 2019 08:21:42 +0000 (10:21 +0200)
committerDavid Marchand <david.marchand@redhat.com>
Fri, 25 Oct 2019 09:54:10 +0000 (11:54 +0200)
commite02b661b51c575df513da550ced0be3dd62020cc
treec7268dca6774593796f4eed0408817a2d816704c
parent3fe4bced1ba1f586ce5407e91537151d4eb43061
bus/pci: check IO permissions for UIO only

On x86, calling inb/outb special instructions (used in UIO ioport
read/write parts) is only possible if the right IO permissions has been
granted.

The only user of this API (the net/virtio pmd) checks this
unconditionnaly but this should be hidden by the rte_pci_ioport API
itself and only checked when the device is bound to a UIO driver.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
drivers/bus/pci/bsd/pci.c
drivers/bus/pci/linux/pci.c
drivers/bus/pci/linux/pci_uio.c