[Qemu-devel] [PATCH v3 0/4] vl: introduce vm_shutdown()

Stefan Hajnoczi posted 4 patches 7 years, 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180307144205.20619-1-stefanha@redhat.com
Test checkpatch passed
Test docker-build@min-glib passed
Test docker-mingw@fedora passed
Test docker-quick@centos6 passed
Test ppcbe passed
Test ppcle passed
Test s390x passed
include/block/aio-wait.h        | 13 +++++++++++++
include/sysemu/iothread.h       |  1 -
include/sysemu/sysemu.h         |  1 +
cpus.c                          | 16 +++++++++++++---
hw/block/dataplane/virtio-blk.c | 24 +++++++++++++++++-------
hw/scsi/virtio-scsi-dataplane.c |  9 +++++----
iothread.c                      | 31 -------------------------------
util/aio-wait.c                 | 31 +++++++++++++++++++++++++++++++
vl.c                            | 13 +++----------
9 files changed, 83 insertions(+), 56 deletions(-)
[Qemu-devel] [PATCH v3 0/4] vl: introduce vm_shutdown()
Posted by Stefan Hajnoczi 7 years, 7 months ago
v3:
 * Rebase on qemu.git/master after AIO_WAIT_WHILE() was merged [Fam]
v2:
 * Tackle the .ioeventfd_stop() vs vq handler race by removing the ioeventfd
   from a BH in the IOThread [Fam]

There are several race conditions in virtio-blk/virtio-scsi dataplane code.
This patch series addresses them, see the commit description for details on the
individual cases.

Stefan Hajnoczi (4):
  block: add aio_wait_bh_oneshot()
  virtio-blk: fix race between .ioeventfd_stop() and vq handler
  virtio-scsi: fix race between .ioeventfd_stop() and vq handler
  vl: introduce vm_shutdown()

 include/block/aio-wait.h        | 13 +++++++++++++
 include/sysemu/iothread.h       |  1 -
 include/sysemu/sysemu.h         |  1 +
 cpus.c                          | 16 +++++++++++++---
 hw/block/dataplane/virtio-blk.c | 24 +++++++++++++++++-------
 hw/scsi/virtio-scsi-dataplane.c |  9 +++++----
 iothread.c                      | 31 -------------------------------
 util/aio-wait.c                 | 31 +++++++++++++++++++++++++++++++
 vl.c                            | 13 +++----------
 9 files changed, 83 insertions(+), 56 deletions(-)

-- 
2.14.3


Re: [Qemu-devel] [Qemu-block] [PATCH v3 0/4] vl: introduce vm_shutdown()
Posted by Stefan Hajnoczi 7 years, 7 months ago
On Wed, Mar 07, 2018 at 02:42:01PM +0000, Stefan Hajnoczi wrote:
> v3:
>  * Rebase on qemu.git/master after AIO_WAIT_WHILE() was merged [Fam]
> v2:
>  * Tackle the .ioeventfd_stop() vs vq handler race by removing the ioeventfd
>    from a BH in the IOThread [Fam]
> 
> There are several race conditions in virtio-blk/virtio-scsi dataplane code.
> This patch series addresses them, see the commit description for details on the
> individual cases.
> 
> Stefan Hajnoczi (4):
>   block: add aio_wait_bh_oneshot()
>   virtio-blk: fix race between .ioeventfd_stop() and vq handler
>   virtio-scsi: fix race between .ioeventfd_stop() and vq handler
>   vl: introduce vm_shutdown()
> 
>  include/block/aio-wait.h        | 13 +++++++++++++
>  include/sysemu/iothread.h       |  1 -
>  include/sysemu/sysemu.h         |  1 +
>  cpus.c                          | 16 +++++++++++++---
>  hw/block/dataplane/virtio-blk.c | 24 +++++++++++++++++-------
>  hw/scsi/virtio-scsi-dataplane.c |  9 +++++----
>  iothread.c                      | 31 -------------------------------
>  util/aio-wait.c                 | 31 +++++++++++++++++++++++++++++++
>  vl.c                            | 13 +++----------
>  9 files changed, 83 insertions(+), 56 deletions(-)
> 
> -- 
> 2.14.3
> 
> 

Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan
Re: [Qemu-devel] [PATCH v3 0/4] vl: introduce vm_shutdown()
Posted by Paolo Bonzini 7 years, 7 months ago
On 07/03/2018 15:42, Stefan Hajnoczi wrote:
> v3:
>  * Rebase on qemu.git/master after AIO_WAIT_WHILE() was merged [Fam]
> v2:
>  * Tackle the .ioeventfd_stop() vs vq handler race by removing the ioeventfd
>    from a BH in the IOThread [Fam]
> 
> There are several race conditions in virtio-blk/virtio-scsi dataplane code.
> This patch series addresses them, see the commit description for details on the
> individual cases.

Acked-by: Paolo Bonzini <pbonzini@redhat.com>

Thanks!

Paolo

Re: [Qemu-devel] [PATCH v3 0/4] vl: introduce vm_shutdown()
Posted by Fam Zheng 7 years, 7 months ago
On Wed, 03/07 14:42, Stefan Hajnoczi wrote:
> v3:
>  * Rebase on qemu.git/master after AIO_WAIT_WHILE() was merged [Fam]
> v2:
>  * Tackle the .ioeventfd_stop() vs vq handler race by removing the ioeventfd
>    from a BH in the IOThread [Fam]
> 
> There are several race conditions in virtio-blk/virtio-scsi dataplane code.
> This patch series addresses them, see the commit description for details on the
> individual cases.

Reviewed-by: Fam Zheng <famz@redhat.com>

Re: [Qemu-devel] [PATCH v3 0/4] vl: introduce vm_shutdown()
Posted by Michael S. Tsirkin 7 years, 7 months ago
On Wed, Mar 07, 2018 at 02:42:01PM +0000, Stefan Hajnoczi wrote:
> v3:
>  * Rebase on qemu.git/master after AIO_WAIT_WHILE() was merged [Fam]
> v2:
>  * Tackle the .ioeventfd_stop() vs vq handler race by removing the ioeventfd
>    from a BH in the IOThread [Fam]

Acked-by: Michael S. Tsirkin <mst@redhat.com>

who is merging this?

> There are several race conditions in virtio-blk/virtio-scsi dataplane code.
> This patch series addresses them, see the commit description for details on the
> individual cases.
> 
> Stefan Hajnoczi (4):
>   block: add aio_wait_bh_oneshot()
>   virtio-blk: fix race between .ioeventfd_stop() and vq handler
>   virtio-scsi: fix race between .ioeventfd_stop() and vq handler
>   vl: introduce vm_shutdown()
> 
>  include/block/aio-wait.h        | 13 +++++++++++++
>  include/sysemu/iothread.h       |  1 -
>  include/sysemu/sysemu.h         |  1 +
>  cpus.c                          | 16 +++++++++++++---
>  hw/block/dataplane/virtio-blk.c | 24 +++++++++++++++++-------
>  hw/scsi/virtio-scsi-dataplane.c |  9 +++++----
>  iothread.c                      | 31 -------------------------------
>  util/aio-wait.c                 | 31 +++++++++++++++++++++++++++++++
>  vl.c                            | 13 +++----------
>  9 files changed, 83 insertions(+), 56 deletions(-)
> 
> -- 
> 2.14.3

Re: [Qemu-devel] [PATCH v3 0/4] vl: introduce vm_shutdown()
Posted by Paolo Bonzini 7 years, 7 months ago
On 08/03/2018 17:01, Michael S. Tsirkin wrote:
> On Wed, Mar 07, 2018 at 02:42:01PM +0000, Stefan Hajnoczi wrote:
>> v3:
>>  * Rebase on qemu.git/master after AIO_WAIT_WHILE() was merged [Fam]
>> v2:
>>  * Tackle the .ioeventfd_stop() vs vq handler race by removing the ioeventfd
>>    from a BH in the IOThread [Fam]
> 
> Acked-by: Michael S. Tsirkin <mst@redhat.com>
> 
> who is merging this?

Probably Stefan himself?  Just in case, for 4/4:

Acked-by: Paolo Bonzini <pbonzini@redhat.com>

>> There are several race conditions in virtio-blk/virtio-scsi dataplane code.
>> This patch series addresses them, see the commit description for details on the
>> individual cases.
>>
>> Stefan Hajnoczi (4):
>>   block: add aio_wait_bh_oneshot()
>>   virtio-blk: fix race between .ioeventfd_stop() and vq handler
>>   virtio-scsi: fix race between .ioeventfd_stop() and vq handler
>>   vl: introduce vm_shutdown()
>>
>>  include/block/aio-wait.h        | 13 +++++++++++++
>>  include/sysemu/iothread.h       |  1 -
>>  include/sysemu/sysemu.h         |  1 +
>>  cpus.c                          | 16 +++++++++++++---
>>  hw/block/dataplane/virtio-blk.c | 24 +++++++++++++++++-------
>>  hw/scsi/virtio-scsi-dataplane.c |  9 +++++----
>>  iothread.c                      | 31 -------------------------------
>>  util/aio-wait.c                 | 31 +++++++++++++++++++++++++++++++
>>  vl.c                            | 13 +++----------
>>  9 files changed, 83 insertions(+), 56 deletions(-)
>>
>> -- 
>> 2.14.3