qemu/hw/scsi
Maxim Levitsky 2d24a64661 device-core: use RCU for list of children of a bus
This fixes the race between device emulation code that tries to find
a child device to dispatch the request to (e.g a scsi disk),
and hotplug of a new device to that bus.

Note that this doesn't convert all the readers of the list
but only these that might go over that list without BQL held.

This is a very small first step to make this code thread safe.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20200913160259.32145-5-mlevitsk@redhat.com>
[Use RCU_READ_LOCK_GUARD in more places, adjust testcase now that
 the delay in DEVICE_DELETED due to RCU is more consistent. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201006123904.610658-9-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-10-12 11:50:50 -04:00
..
emulation.c scsi-generic: avoid invalid access to struct when emulating block limits 2018-11-06 21:35:06 +01:00
esp-pci.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
esp.c esp: Rename ESP_STATE to ESP 2020-09-09 13:20:22 -04:00
Kconfig hw/nvram/Kconfig: Add an entry for the NMC93xx EEPROM 2020-01-07 12:08:39 +01:00
lsi53c895a.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
megasas.c hw: megasas: consider 'iov_count=0' is an error in megasas_map_sgl 2020-09-30 19:09:20 +02:00
meson.build meson: convert hw/scsi 2020-08-21 06:30:28 -04:00
mfi.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
mpi.h hw: Add support for LSI SAS1068 (mptsas) device 2016-02-09 15:45:26 +01:00
mptconfig.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
mptendian.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
mptsas.c mptsas: Move QOM macros to header 2020-08-27 14:04:55 -04:00
mptsas.h Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
scsi-bus.c device-core: use RCU for list of children of a bus 2020-10-12 11:50:50 -04:00
scsi-disk.c Use OBJECT_DECLARE_TYPE when possible 2020-09-18 14:12:32 -04:00
scsi-generic.c scsi-generic: Fix HM-zoned device scan 2020-09-30 19:09:20 +02:00
spapr_vscsi.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
srp.h spapr-vscsi: add task management 2013-09-12 08:46:21 +02:00
trace-events hw/scsi/spapr_vscsi: Convert debug fprintf() to trace event 2020-03-17 15:08:50 +11:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
vhost-scsi-common.c vhost-scsi: support inflight io track 2020-09-30 19:09:20 +02:00
vhost-scsi.c monitor: Use getter/setter functions for cur_mon 2020-10-09 07:08:19 +02:00
vhost-user-scsi.c virtio-scsi-pci: default num_queues to -smp N 2020-08-27 08:29:13 -04:00
viosrp.h hw/scsi/spapr_vscsi: Do not mix SRP IU size with DMA buffer size 2020-03-17 15:08:50 +11:00
virtio-scsi-dataplane.c Replace '-enable-kvm' with '-accel kvm' in docs and help texts 2018-06-28 19:05:32 +02:00
virtio-scsi.c device-core: use RCU for list of children of a bus 2020-10-12 11:50:50 -04:00
vmw_pvscsi.c Use OBJECT_DECLARE_TYPE when possible 2020-09-18 14:12:32 -04:00
vmw_pvscsi.h scsi: VMWare PVSCSI paravirtual device implementation 2013-04-19 10:44:17 +02:00