aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-07-25 09:59:00 +0100
committerPeter Maydell <peter.maydell@linaro.org>2019-07-25 09:59:00 +0100
commit7ea53245335b4f60b56a3323232baa39d9bb1ebb (patch)
tree73db4800470400ff616a8e58a7b86df2ad9199ea /hw
parentbf8b024372bf8abf5a9f40bfa65eeefad23ff988 (diff)
parent6baabe5cf8d42ce6bc542fb3ec0bfc10c0ee6c5e (diff)
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
Two more bugfix patches + 1 doc fix. # gpg: Signature made Wed 24 Jul 2019 10:22:06 BST # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: docs: correct kconfig option i386/kvm: Do not sync nested state during runtime virtio-scsi: fixed virtio_scsi_ctx_check failed when detaching scsi disk Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/scsi/virtio-scsi.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
index d0bdbff090..8b9e5e2b49 100644
--- a/hw/scsi/virtio-scsi.c
+++ b/hw/scsi/virtio-scsi.c
@@ -832,6 +832,7 @@ static void virtio_scsi_hotunplug(HotplugHandler *hotplug_dev, DeviceState *dev,
VirtIODevice *vdev = VIRTIO_DEVICE(hotplug_dev);
VirtIOSCSI *s = VIRTIO_SCSI(vdev);
SCSIDevice *sd = SCSI_DEVICE(dev);
+ AioContext *ctx = s->ctx ?: qemu_get_aio_context();
if (virtio_vdev_has_feature(vdev, VIRTIO_SCSI_F_HOTPLUG)) {
virtio_scsi_acquire(s);
@@ -841,14 +842,16 @@ static void virtio_scsi_hotunplug(HotplugHandler *hotplug_dev, DeviceState *dev,
virtio_scsi_release(s);
}
+ aio_disable_external(ctx);
+ qdev_simple_device_unplug_cb(hotplug_dev, dev, errp);
+ aio_enable_external(ctx);
+
if (s->ctx) {
virtio_scsi_acquire(s);
/* If other users keep the BlockBackend in the iothread, that's ok */
blk_set_aio_context(sd->conf.blk, qemu_get_aio_context(), NULL);
virtio_scsi_release(s);
}
-
- qdev_simple_device_unplug_cb(hotplug_dev, dev, errp);
}
static struct SCSIBusInfo virtio_scsi_scsi_info = {