diff options
author | 2020-09-10 10:59:57 -0400 | |
---|---|---|
committer | 2020-09-22 10:52:24 -0600 | |
commit | 515ecd5368f1510152fa4f9b9ce55b66ac56c334 (patch) | |
tree | 6b4a5e3c00c739db0f82c3e55faf1ac1a244167f /drivers/usb/cdns3/cdns3-imx.c | |
parent | s390/pci: Mark all VFs as not implementing PCI_COMMAND_MEMORY (diff) | |
download | linux-dev-515ecd5368f1510152fa4f9b9ce55b66ac56c334.tar.xz linux-dev-515ecd5368f1510152fa4f9b9ce55b66ac56c334.zip |
vfio/pci: Decouple PCI_COMMAND_MEMORY bit checks from is_virtfn
While it is true that devices with is_virtfn=1 will have a Memory Space
Enable bit that is hard-wired to 0, this is not the only case where we
see this behavior -- For example some bare-metal hypervisors lack
Memory Space Enable bit emulation for devices not setting is_virtfn
(s390). Fix this by instead checking for the newly-added
no_command_memory bit which directly denotes the need for
PCI_COMMAND_MEMORY emulation in vfio.
Fixes: abafbc551fdd ("vfio-pci: Invalidate mmaps and block MMIO access on disabled memory")
Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.ibm.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-imx.c')
0 files changed, 0 insertions, 0 deletions