pci_iov_config() sizes the VF BARs in a PF's SR-IOV capability with pci_read_bar(), then reserves and programs them through pci_alloc_multi_resource() and pci_reserve_map(). Both functions clear the memory enable bit in the device's command register while they write the BAR. For a VF BAR that is the wrong bit: VF BARs are decoded under VF Memory Space Enable in the SR-IOV control register, which pci_iov_config() has already cleared at this point.
Clearing the PF's command register instead takes the PF's own BARs away from its driver, which is attached and running: PCI_IOV_INIT() has already been called, and the driver's interrupt handlers and tasks keep accessing the device. For the few microseconds the bit is clear, a register read returns all ones and a register write is dropped.
This was found with an out-of-tree SR-IOV PF driver for the Intel I350: a register write that releases the adapter's hardware semaphore (SWSM.SMBI) landed in the window opened by pci_reserve_map() and was lost, after which the drivers of all ports waited for the semaphore forever. The window itself is in the PCI code and is the same for any PF driver that accesses its registers while iovctl -C runs.
Leave the command register alone for VF BARs in both places. Nothing else has to be disabled for them: pci_iov_config() clears VF Enable and VF MSE before it sets up the VF BARs and sets them again only once all of them are programmed. Other BARs (and ROM BARs, and the VFs' own BARs) are handled as before; pci_read_bar()'s interface does not change.