mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
Revert "pcie_sriov: Reuse SR-IOV VF device instances"
This reverts commit 139610ae67
.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
9bab08da4e
commit
b1282f1e35
5 changed files with 62 additions and 56 deletions
|
@ -680,4 +680,9 @@ static inline void pci_irq_pulse(PCIDevice *pci_dev)
|
|||
MSIMessage pci_get_msi_message(PCIDevice *dev, int vector);
|
||||
void pci_set_enabled(PCIDevice *pci_dev, bool state);
|
||||
|
||||
static inline void pci_set_power(PCIDevice *pci_dev, bool state)
|
||||
{
|
||||
pci_set_enabled(pci_dev, state);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -212,21 +212,6 @@ static inline uint16_t pci_get_bdf(PCIDevice *dev)
|
|||
return PCI_BUILD_BDF(pci_bus_num(pci_get_bus(dev)), dev->devfn);
|
||||
}
|
||||
|
||||
static inline void pci_set_power(PCIDevice *pci_dev, bool state)
|
||||
{
|
||||
/*
|
||||
* Don't change the enabled state of VFs when powering on/off the device.
|
||||
*
|
||||
* When powering on, VFs must not be enabled immediately but they must
|
||||
* wait until the guest configures SR-IOV.
|
||||
* When powering off, their corresponding PFs will be reset and disable
|
||||
* VFs.
|
||||
*/
|
||||
if (!pci_is_vf(pci_dev)) {
|
||||
pci_set_enabled(pci_dev, state);
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t pci_requester_id(PCIDevice *dev);
|
||||
|
||||
/* DMA access functions */
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
typedef struct PCIESriovPF {
|
||||
uint16_t num_vfs; /* Number of virtual functions created */
|
||||
uint8_t vf_bar_type[PCI_NUM_REGIONS]; /* Store type for each VF bar */
|
||||
const char *vfname; /* Reference to the device type used for the VFs */
|
||||
PCIDevice **vf; /* Pointer to an array of num_vfs VF devices */
|
||||
} PCIESriovPF;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue