qdev: add "check if address free" callback for buses
commitbb755ba47f3747251c0eadf681ee68b9033309b8
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 6 Oct 2020 12:38:55 +0000 (6 15:38 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 12 Oct 2020 15:50:50 +0000 (12 11:50 -0400)
tree7d9a3c8a3f163876c62c7b0b79e6afc0aadc97e0
parentd8a18da56df93b7f778fb97ba370031597d19ffd
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>
hw/core/qdev.c
hw/net/virtio-net.c
hw/sd/core.c
include/hw/qdev-core.h