summaryrefslogtreecommitdiffstats
path: root/scripts/clean-includes
diff options
context:
space:
mode:
authorMaxim Levitsky2020-10-06 14:39:00 +0200
committerPaolo Bonzini2020-10-12 17:50:51 +0200
commita23151e8cc8cc08546252dc9c7671171d9c44615 (patch)
treeccc528af0d0419034c5dfee617f596f0751faf6d /scripts/clean-includes
parentscsi: switch to bus->check_address (diff)
downloadqemu-a23151e8cc8cc08546252dc9c7671171d9c44615.tar.gz
qemu-a23151e8cc8cc08546252dc9c7671171d9c44615.tar.xz
qemu-a23151e8cc8cc08546252dc9c7671171d9c44615.zip
device-core: use atomic_set on .realized property
Some code might race with placement of new devices on a bus. We currently first place a (unrealized) device on the bus and then realize it. As a workaround, users that scan the child device list, can check the realized property to see if it is safe to access such a device. Use an atomic write here too to aid with this. A separate discussion is what to do with devices that are unrealized: It looks like for this case we only call the hotplug handler's unplug callback and its up to it to unrealize the device. An atomic operation doesn't cause harm for this code path though. Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20200913160259.32145-6-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20201006123904.610658-10-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'scripts/clean-includes')
0 files changed, 0 insertions, 0 deletions