or commenting out lines in the second group.
It is also possible to run QEMU's configure script with the
-``--with-default-devices`` option. When this is done, everything defaults
+``--without-default-devices`` option. When this is done, everything defaults
to ``n`` unless it is ``select``ed or explicitly switched on in the
``.mak`` files. In other words, ``default`` and ``imply`` directives
are disabled. When QEMU is built with this option, the user will probably
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);
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 = {
assert(cpu_is_stopped(cpu) || qemu_cpu_is_self(cpu));
- ret = kvm_put_nested_state(x86_cpu);
- if (ret < 0) {
- return ret;
- }
-
if (level >= KVM_PUT_RESET_STATE) {
+ ret = kvm_put_nested_state(x86_cpu);
+ if (ret < 0) {
+ return ret;
+ }
+
ret = kvm_put_msr_feature_control(x86_cpu);
if (ret < 0) {
return ret;