This is my take on Maxim's patches. Mostly I am avoiding the problems with "scsi/scsi_bus: switch search direction in scsi_device_find" by adding a pre-realize callback for BusState that checks for the device address being in use.
This makes it possible to avoid the tricky search for a preexisting device. Maxim Levitsky (7): scsi/scsi_bus: switch search direction in scsi_device_find device_core: use drain_call_rcu in in hmp_device_del/qmp_device_add device-core: use RCU for list of children of a bus device-core: use atomic_set on .realized property scsi/scsi_bus: Add scsi_device_get virtio-scsi: use scsi_device_get scsi/scsi_bus: fix races in REPORT LUNS Paolo Bonzini (3): qdev: add "check if address free" callback for buses scsi: switch to bus->check_address scsi/scsi-bus: scsi_device_find: don't return unrealized devices hw/core/bus.c | 28 +++-- hw/core/qdev.c | 73 +++++++++--- hw/net/virtio-net.c | 2 +- hw/scsi/scsi-bus.c | 262 ++++++++++++++++++++++++++--------------- hw/scsi/virtio-scsi.c | 27 +++-- hw/sd/core.c | 3 +- include/hw/qdev-core.h | 15 ++- include/hw/scsi/scsi.h | 1 + qdev-monitor.c | 22 ++++ 9 files changed, 299 insertions(+), 134 deletions(-) -- 2.26.2