pci: set PCI memory enable before mapping PCI BAR 14/29514/1
authorMohammed Hawari <mohammed@hawari.fr>
Wed, 21 Oct 2020 14:41:30 +0000 (16:41 +0200)
committerMohammed HAWARI <momohawari@gmail.com>
Wed, 28 Oct 2020 16:27:23 +0000 (16:27 +0000)
commit7ed6a731ad352d2cbd610481eed8f1ed5e2997c4
treecee4f525cc93cfa780ba5bc026ac4cdcd58447d4
parent11166453a54511b1396faed46abb946a0d2eb393
pci: set PCI memory enable before mapping PCI BAR

This change mitigates software faults issued by some versions of the
linux kernel vfio-pci driver when VF PCI BARs are used without setting
the memory enable bit in the PCI configuration. This problem is
mentionned in https://lkml.org/lkml/2020/6/25/628

Change-Id: Idc177be4a5adb6ee467b4dd8f055f133ff267fe1
Type: improvement
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
(cherry picked from commit 70fc36f26855fb4c7a56c5d1563d541b395f8f5d)
src/vlib/linux/pci.c