From: Michael S. Tsirkin Date: Thu, 1 Aug 2024 07:44:38 +0000 (-0400) Subject: Revert "pcie_sriov: Register VFs after migration" X-Git-Tag: qemu-xen-4.20.0~39^2~10 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=b9ba81769499533488540b6d5ed7c7569476a427;p=qemu-xen.git Revert "pcie_sriov: Register VFs after migration" This reverts commit 107a64b9a360cf5ca046852bc03334f7a9f22aef. Signed-off-by: Michael S. Tsirkin --- diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 4c7be52951..5c0050e178 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -733,17 +733,10 @@ static bool migrate_is_not_pcie(void *opaque, int version_id) return !pci_is_express((PCIDevice *)opaque); } -static int pci_post_load(void *opaque, int version_id) -{ - pcie_sriov_pf_post_load(opaque); - return 0; -} - const VMStateDescription vmstate_pci_device = { .name = "PCIDevice", .version_id = 2, .minimum_version_id = 1, - .post_load = pci_post_load, .fields = (const VMStateField[]) { VMSTATE_INT32_POSITIVE_LE(version_id, PCIDevice), VMSTATE_BUFFER_UNSAFE_INFO_TEST(config, PCIDevice, diff --git a/hw/pci/pcie_sriov.c b/hw/pci/pcie_sriov.c index 56523ab4e8..fae6acea4a 100644 --- a/hw/pci/pcie_sriov.c +++ b/hw/pci/pcie_sriov.c @@ -252,13 +252,6 @@ void pcie_sriov_config_write(PCIDevice *dev, uint32_t address, } } -void pcie_sriov_pf_post_load(PCIDevice *dev) -{ - if (dev->exp.sriov_cap) { - register_vfs(dev); - } -} - /* Reset SR/IOV */ void pcie_sriov_pf_reset(PCIDevice *dev) diff --git a/include/hw/pci/pcie_sriov.h b/include/hw/pci/pcie_sriov.h index c5d2d318d3..5148c5b77d 100644 --- a/include/hw/pci/pcie_sriov.h +++ b/include/hw/pci/pcie_sriov.h @@ -57,8 +57,6 @@ void pcie_sriov_pf_add_sup_pgsize(PCIDevice *dev, uint16_t opt_sup_pgsize); void pcie_sriov_config_write(PCIDevice *dev, uint32_t address, uint32_t val, int len); -void pcie_sriov_pf_post_load(PCIDevice *dev); - /* Reset SR/IOV */ void pcie_sriov_pf_reset(PCIDevice *dev);