mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: Init address before qemuProcessShutdownOrReboot during reconnect process
When libvirt is restarted, the qemuProcessShutdownReboot command is executed to restore the VM that is being restarted. In this case, a coredump may occur when we hotplug a pci device since the PCI address hasn't be inited yet. Moving the initialization of address to the front of qemuProcessShutdownOrReboot to ensure that we have the address inited. Signed-off-by: Jiang Jiacheng <jiangjiacheng@huawei.com> Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
f30843142a
commit
1241670abd
@ -8760,6 +8760,11 @@ qemuProcessReconnect(void *opaque)
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (qemuDomainAssignAddresses(obj->def, priv->qemuCaps,
|
||||||
|
driver, obj, false) < 0) {
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
/* In case the domain shutdown or fake reboot while we were not running,
|
/* In case the domain shutdown or fake reboot while we were not running,
|
||||||
* we need to finish the shutdown or fake reboot process. And we need to
|
* we need to finish the shutdown or fake reboot process. And we need to
|
||||||
* do it after we have virQEMUCaps filled in.
|
* do it after we have virQEMUCaps filled in.
|
||||||
@ -8775,11 +8780,6 @@ qemuProcessReconnect(void *opaque)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((qemuDomainAssignAddresses(obj->def, priv->qemuCaps,
|
|
||||||
driver, obj, false)) < 0) {
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* if domain requests security driver we haven't loaded, report error, but
|
/* if domain requests security driver we haven't loaded, report error, but
|
||||||
* do not kill the domain
|
* do not kill the domain
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user