mirror of https://github.com/xemu-project/xemu.git
Revert "pcie_sriov: Do not manually unrealize"
This reverts commit c613ad2512
.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
19c45c00dc
commit
b0fdaee5d1
|
@ -204,7 +204,11 @@ static void unregister_vfs(PCIDevice *dev)
|
||||||
trace_sriov_unregister_vfs(dev->name, PCI_SLOT(dev->devfn),
|
trace_sriov_unregister_vfs(dev->name, PCI_SLOT(dev->devfn),
|
||||||
PCI_FUNC(dev->devfn), num_vfs);
|
PCI_FUNC(dev->devfn), num_vfs);
|
||||||
for (i = 0; i < num_vfs; i++) {
|
for (i = 0; i < num_vfs; i++) {
|
||||||
|
Error *err = NULL;
|
||||||
PCIDevice *vf = dev->exp.sriov_pf.vf[i];
|
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_unparent(OBJECT(vf));
|
||||||
object_unref(OBJECT(vf));
|
object_unref(OBJECT(vf));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue