diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2024-08-01 03:44:45 -0400 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2024-08-01 04:32:00 -0400 |
commit | b0fdaee5d1ed52f650ca0c3bebfce3dd4dc8ddb5 (patch) | |
tree | dbafb975ba3664891e6c1f2923ac72e568131314 /hw | |
parent | 19c45c00dc6a52f80f27dabbd28de1b770c16a89 (diff) |
Revert "pcie_sriov: Do not manually unrealize"
This reverts commit c613ad25125bf3016aa8f81ce170f5ac91d2379f.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/pci/pcie_sriov.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/pci/pcie_sriov.c b/hw/pci/pcie_sriov.c index 499becd527..e9b23221d7 100644 --- a/hw/pci/pcie_sriov.c +++ b/hw/pci/pcie_sriov.c @@ -204,7 +204,11 @@ static void unregister_vfs(PCIDevice *dev) trace_sriov_unregister_vfs(dev->name, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn), num_vfs); for (i = 0; i < num_vfs; i++) { + Error *err = NULL; PCIDevice *vf = dev->exp.sriov_pf.vf[i]; + if (!object_property_set_bool(OBJECT(vf), "realized", false, &err)) { + error_reportf_err(err, "Failed to unplug: "); + } object_unparent(OBJECT(vf)); object_unref(OBJECT(vf)); } |