summaryrefslogtreecommitdiff
path: root/drivers/pci/iov.c
diff options
context:
space:
mode:
authorMatthew Rosato <mjrosato@linux.ibm.com>2020-09-10 10:59:55 -0400
committerAlex Williamson <alex.williamson@redhat.com>2020-09-21 14:42:11 -0600
commit12856e7acde4702b7c3238c15fcba86ff6aa507f (patch)
treef9e0073991158db7fb74b6b0fe05444836722a1e /drivers/pci/iov.c
parentba4f184e126b751d1bffad5897f263108befc780 (diff)
PCI/IOV: Mark VFs as not implementing PCI_COMMAND_MEMORY
For VFs, the Memory Space Enable bit in the Command Register is hard-wired to 0. Add a new bit to signify devices where the Command Register Memory Space Enable bit does not control the device's response to MMIO accesses. Fixes: abafbc551fdd ("vfio-pci: Invalidate mmaps and block MMIO access on disabled memory") Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/pci/iov.c')
-rw-r--r--drivers/pci/iov.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
index b37e08c4f9d1..4afd4ee4f7f0 100644
--- a/drivers/pci/iov.c
+++ b/drivers/pci/iov.c
@@ -180,6 +180,7 @@ int pci_iov_add_virtfn(struct pci_dev *dev, int id)
virtfn->device = iov->vf_device;
virtfn->is_virtfn = 1;
virtfn->physfn = pci_dev_get(dev);
+ virtfn->no_command_memory = 1;
if (id == 0)
pci_read_vf_config_common(virtfn);