[Qemu-devel] [RFC v2 0/3] scsi: restart dma after vm change state handlers

Stefan Hajnoczi posted 3 patches 4 years, 11 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
include/hw/scsi/scsi.h     |  5 +++++
include/hw/virtio/virtio.h |  7 +++++++
hw/scsi/scsi-bus.c         | 37 ++++++++++++++++++++++++++++++-------
hw/scsi/virtio-scsi.c      | 17 +++++++++++++++++
hw/virtio/virtio.c         |  9 +++++++++
5 files changed, 68 insertions(+), 7 deletions(-)
[Qemu-devel] [RFC v2 0/3] scsi: restart dma after vm change state handlers
Posted by Stefan Hajnoczi 4 years, 11 months ago
v2:
 * Do it properly with a clean API instead of deferring to a BH!
   Thanks for encouraging me to do this, Kevin.

These patches solve a deadlock when the 'cont' command is used and there are
failed requests on a virtio-scsi device with iothreads.  The deadlock itself is
actually not the thing we need to fix because we should never reach that case
anyway.  Instead we need to make sure DMA restart is only performed after the
virtio-scsi iothread is re-initialized.

Stefan Hajnoczi (3):
  virtio: add vdc->vmchange_state() callback
  scsi: add scsi_bus_dma_restart()
  virtio-scsi: fix iothread deadlock on 'cont'

 include/hw/scsi/scsi.h     |  5 +++++
 include/hw/virtio/virtio.h |  7 +++++++
 hw/scsi/scsi-bus.c         | 37 ++++++++++++++++++++++++++++++-------
 hw/scsi/virtio-scsi.c      | 17 +++++++++++++++++
 hw/virtio/virtio.c         |  9 +++++++++
 5 files changed, 68 insertions(+), 7 deletions(-)

-- 
2.21.0