mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
qdev: add "check if address free" callback for buses
Check if an address is free on the bus before plugging in the device. This makes it possible to do the check without any side effects, and to detect the problem early without having to do it in the realize callback. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20201006123904.610658-5-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
d8a18da56d
commit
bb755ba47f
4 changed files with 30 additions and 5 deletions
|
@ -3138,7 +3138,7 @@ static bool failover_replug_primary(VirtIONet *n, Error **errp)
|
|||
error_setg(errp, "virtio_net: couldn't find primary bus");
|
||||
return false;
|
||||
}
|
||||
qdev_set_parent_bus(n->primary_dev, n->primary_bus);
|
||||
qdev_set_parent_bus(n->primary_dev, n->primary_bus, &error_abort);
|
||||
n->primary_should_be_hidden = false;
|
||||
if (!qemu_opt_set_bool(n->primary_device_opts,
|
||||
"partially_hotplugged", true, errp)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue