linux/drivers/vfio/pci
Matthew Rosato 515ecd5368 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: abafbc551f ("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>
2020-09-22 10:52:24 -06:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
trace.h vfio/pci: Cleanup license mess 2019-01-22 11:06:05 -07:00
vfio_pci_config.c vfio/pci: Decouple PCI_COMMAND_MEMORY bit checks from is_virtfn 2020-09-22 10:52:24 -06:00
vfio_pci_igd.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
vfio_pci_intrs.c vfio-pci: Invalidate mmaps and block MMIO access on disabled memory 2020-05-18 09:53:38 -06:00
vfio_pci_nvlink2.c drivers/powerpc: Replace _ALIGN_UP() by ALIGN() 2020-05-11 23:15:15 +10:00
vfio_pci_private.h vfio-pci: Avoid recursive read-lock usage 2020-08-17 11:08:18 -06:00
vfio_pci_rdwr.c vfio-pci: Avoid recursive read-lock usage 2020-08-17 11:08:18 -06:00
vfio_pci.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00