Skip to content

RFC scsi: restart dma after vm change state handlers

Stefan Hajnoczi qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 RFC Latest3 patches 5 repliesIn review
  2. v2 RFC3 patches 1 replySuperseded
  3. v1 RFC1 patch 3 repliesSuperseded

Changes in v3 from the cover letter

* Fix s/k->vmstate_change/vdc->vmstate_change/
* Still RFC, waiting for customer to confirm this fixes the issue

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3virtio: add vdc->vmchange_state() callbackhw/virtio/virtio.c include/hw/virtio/virtio.h+16 -00 replies
2/3scsi: add scsi_bus_dma_restart()hw/scsi/scsi-bus.c include/hw/scsi/scsi.h+35 -70 replies
3/3virtio-scsi: fix iothread deadlock on 'cont'hw/scsi/virtio-scsi.c+17 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

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

v3:
* Fix s/k->vmstate_change/vdc->vmstate_change/
* Still RFC, waiting for customer to confirm this fixes the issue
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(-)
Signature · 1 line
2.21.0