qdev: unplug blocker for devices
commit217c7f01adaf2853951d4725e3527ae70c45fbfc
authorJagannathan Raman <jag.raman@oracle.com>
Mon, 13 Jun 2022 20:26:21 +0000 (13 16:26 -0400)
committerStefan Hajnoczi <stefanha@redhat.com>
Wed, 15 Jun 2022 13:50:41 +0000 (15 14:50 +0100)
tree6d98aab623149d74f19b1549cdb56d83e759b436
parente2848bc574fe2715c694bf8fe9a1ba7f78a1125a
qdev: unplug blocker for devices

Add blocker to prevent hot-unplug of devices

TYPE_VFIO_USER_SERVER, which is introduced shortly, attaches itself to a
PCIDevice on which it depends. If the attached PCIDevice gets removed
while the server in use, it could cause it crash. To prevent this,
TYPE_VFIO_USER_SERVER adds an unplug blocker for the PCIDevice.

Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com>
Signed-off-by: John G Johnson <john.g.johnson@oracle.com>
Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: c41ef80b7cc063314d629737bed2159e5713f2e0.1655151679.git.jag.raman@oracle.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/core/qdev.c
include/hw/qdev-core.h
softmmu/qdev-monitor.c