[Qemu-devel] [PATCH 0/3] iothread-related fixes for virtio-scsi

Alberto Garcia posted 3 patches 6 years, 9 months ago
Test docker-mingw@fedora passed
Test asan passed
Test checkpatch passed
Test docker-clang@ubuntu passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/cover.1548171741.git.berto@igalia.com
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Fam Zheng <fam@euphon.net>, Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
hw/scsi/scsi-disk.c        |  23 ++++++--
hw/scsi/virtio-scsi.c      |  13 +++++
tests/qemu-iotests/240     | 129 +++++++++++++++++++++++++++++++++++++++++++++
tests/qemu-iotests/240.out |  54 +++++++++++++++++++
tests/qemu-iotests/group   |   1 +
5 files changed, 217 insertions(+), 3 deletions(-)
create mode 100755 tests/qemu-iotests/240
create mode 100644 tests/qemu-iotests/240.out
[Qemu-devel] [PATCH 0/3] iothread-related fixes for virtio-scsi
Posted by Alberto Garcia 6 years, 9 months ago
Hi,

here are three patches with iothread-related fixes for virtio-scsi,
with their test cases.

This series fixes the following bugs:

   https://bugzilla.redhat.com/show_bug.cgi?id=1656276

   https://bugzilla.redhat.com/show_bug.cgi?id=1662508

I also wanted to do prepare a similar one for virtio-blk but I'm
unsure about how to proceed, because I'm unable to detect during
realize() that the blockdev is using a different iothread. This
crashes QEMU:

{ "execute": "qmp_capabilities" }
{ "execute": "blockdev-add", "arguments": {"driver": "null-co", "node-name": "hd0", "read-only": true}}
{ "execute": "object-add", "arguments": {"qom-type": "iothread", "id": "iothread0"}}
{ "execute": "object-add", "arguments": {"qom-type": "iothread", "id": "iothread1"}}
{ "execute": "device_add", "arguments": {"id": "virtio-blk0", "driver": "virtio-blk", "iothread": "iothread0", "drive": "hd0"}}
{ "execute": "system_reset"}
  (wait for the events)
{ "execute": "device_add", "arguments": {"id": "virtio-blk1", "driver": "virtio-blk", "iothread": "iothread1", "drive": "hd0"}}

Regards,

Berto

Alberto Garcia (3):
  virtio-scsi: Move BlockBackend back to the main AioContext on unplug
  scsi-disk: Acquire the AioContext in scsi_*_realize()
  virtio-scsi: Forbid devices with different iothreads sharing a
    blockdev

 hw/scsi/scsi-disk.c        |  23 ++++++--
 hw/scsi/virtio-scsi.c      |  13 +++++
 tests/qemu-iotests/240     | 129 +++++++++++++++++++++++++++++++++++++++++++++
 tests/qemu-iotests/240.out |  54 +++++++++++++++++++
 tests/qemu-iotests/group   |   1 +
 5 files changed, 217 insertions(+), 3 deletions(-)
 create mode 100755 tests/qemu-iotests/240
 create mode 100644 tests/qemu-iotests/240.out

-- 
2.11.0


Re: [Qemu-devel] [PATCH 0/3] iothread-related fixes for virtio-scsi
Posted by Kevin Wolf 6 years, 9 months ago
Am 22.01.2019 um 16:53 hat Alberto Garcia geschrieben:
> Hi,
> 
> here are three patches with iothread-related fixes for virtio-scsi,
> with their test cases.
> 
> This series fixes the following bugs:
> 
>    https://bugzilla.redhat.com/show_bug.cgi?id=1656276
> 
>    https://bugzilla.redhat.com/show_bug.cgi?id=1662508
> 
> I also wanted to do prepare a similar one for virtio-blk but I'm
> unsure about how to proceed, because I'm unable to detect during
> realize() that the blockdev is using a different iothread. This
> crashes QEMU:
> 
> { "execute": "qmp_capabilities" }
> { "execute": "blockdev-add", "arguments": {"driver": "null-co", "node-name": "hd0", "read-only": true}}
> { "execute": "object-add", "arguments": {"qom-type": "iothread", "id": "iothread0"}}
> { "execute": "object-add", "arguments": {"qom-type": "iothread", "id": "iothread1"}}
> { "execute": "device_add", "arguments": {"id": "virtio-blk0", "driver": "virtio-blk", "iothread": "iothread0", "drive": "hd0"}}
> { "execute": "system_reset"}
>   (wait for the events)
> { "execute": "device_add", "arguments": {"id": "virtio-blk1", "driver": "virtio-blk", "iothread": "iothread1", "drive": "hd0"}}

Thanks, applied to the block branch.

Kevin