[Qemu-devel] [PATCH 0/6] Acquire the AioContext during _realize()

Alberto Garcia posted 6 patches 1 week ago
Test asan passed
Test checkpatch passed
Test docker-clang@ubuntu passed
Test docker-mingw@fedora passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/cover.1547132561.git.berto@igalia.com
hw/block/fdc.c        | 15 +++++++++++----
hw/block/nvme.c       | 13 ++++++++++---
hw/block/virtio-blk.c | 22 +++++++++++++++-------
hw/ide/qdev.c         | 17 ++++++++++++-----
hw/scsi/scsi-disk.c   | 24 +++++++++++++++++++-----
hw/usb/dev-storage.c  |  5 +++++
6 files changed, 72 insertions(+), 24 deletions(-)

[Qemu-devel] [PATCH 0/6] Acquire the AioContext during _realize()

Posted by Alberto Garcia 1 week ago
As discussed yesterday, this series acquires the AioContext in the
_realize() functions of several devices before making use of their
block backends. This fixes at least a couple of crashes (in virtio-blk
and scsi).

Berto

Alberto Garcia (6):
  block: Acquire the AioContext in virtio_blk_device_realize()
  block: Acquire the AioContext in scsi_*_realize()
  block: Acquire the AioContext in floppy_drive_realize()
  block: Acquire the AioContext in nvme_realize()
  block: Acquire the AioContext in ide_dev_initfn()
  block: Acquire the AioContext in usb_msd_storage_realize()

 hw/block/fdc.c        | 15 +++++++++++----
 hw/block/nvme.c       | 13 ++++++++++---
 hw/block/virtio-blk.c | 22 +++++++++++++++-------
 hw/ide/qdev.c         | 17 ++++++++++++-----
 hw/scsi/scsi-disk.c   | 24 +++++++++++++++++++-----
 hw/usb/dev-storage.c  |  5 +++++
 6 files changed, 72 insertions(+), 24 deletions(-)

-- 
2.11.0


Re: [Qemu-devel] [PATCH 0/6] Acquire the AioContext during _realize()

Posted by Kevin Wolf 6 days ago
Am 10.01.2019 um 16:03 hat Alberto Garcia geschrieben:
> As discussed yesterday, this series acquires the AioContext in the
> _realize() functions of several devices before making use of their
> block backends. This fixes at least a couple of crashes (in virtio-blk
> and scsi).

Apart from the incomplete scsi-block fix, this looks good. Of course,
I think patches 3-6 are completely optional because none of these
devices actually support iothreads, so we can't hit a bug. But it might
be nicer to add it there as well anyway.

For patches 1 and 2, which actually fix bugs, it would be nice to have
an accompanying test case.

Kevin

Re: [Qemu-devel] [PATCH 0/6] Acquire the AioContext during _realize()

Posted by Alberto Garcia 6 days ago
On Fri 11 Jan 2019 04:09:17 PM CET, Kevin Wolf wrote:
> Am 10.01.2019 um 16:03 hat Alberto Garcia geschrieben:
>> As discussed yesterday, this series acquires the AioContext in the
>> _realize() functions of several devices before making use of their
>> block backends. This fixes at least a couple of crashes (in virtio-blk
>> and scsi).
>
> Apart from the incomplete scsi-block fix, this looks good. Of course,
> I think patches 3-6 are completely optional because none of these
> devices actually support iothreads, so we can't hit a bug. But it
> might be nicer to add it there as well anyway.
>
> For patches 1 and 2, which actually fix bugs, it would be nice to have
> an accompanying test case.

Ok, I'll prepare v2 with your suggestions.

Berto

Re: [Qemu-devel] [PATCH 0/6] Acquire the AioContext during _realize()

Posted by Markus Armbruster 6 days ago
For what it's worth, this series seems to fix assertion failures related
to AioContext acquire/release I've seen.