[PATCH 00/16] Reentrancy fixes for lsi53c895a, and cleanups to ncr710

Paolo Bonzini posted 16 patches 5 days, 15 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260327212547.460420-1-pbonzini@redhat.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Fam Zheng <fam@euphon.net>, Richard Henderson <richard.henderson@linaro.org>, Helge Deller <deller@gmx.de>
hw/scsi/ncr53c710.h  |   7 +-
hw/scsi/lsi53c895a.c | 101 ++++++++++++++----------
hw/scsi/ncr53c710.c  | 177 +++++++++++++++++++------------------------
3 files changed, 146 insertions(+), 139 deletions(-)
[PATCH 00/16] Reentrancy fixes for lsi53c895a, and cleanups to ncr710
Posted by Paolo Bonzini 5 days, 15 hours ago
lsi53c895a is one of the few devices that explicitly disable the reentrancy
guard, and the result is a lot more opportunities for things to go wrong.
DMA writes to itself or to the PCI bridge can cause resets or device
unplugs.

This series fixes two such issues.  Patch 2 is just a cleanup in the same
area.

ncr710 has similar issues, even though they are not fatal thanks to the
reentrancy guard. The second half of the series cleans up the two devices
to have even more similar code than they already have, so that the same
reference counting fix can be applied.

Note that I have only tested the lsi part of the series.

Paolo

Paolo Bonzini (16):
  lsi53c895a: keep a reference to the device while SCRIPTS execute
  lsi53c895a: do not do anything else is a reset is requested by writing
    ISTAT0
  lsi53c895a: keep lsi_request and SCSIRequest in local variables
  lsi53c895a: keep lsi_request alive as long as the SCSIRequest
  lsi53c895a: keep SCSIRequest alive during DMA
  ncr710, lsi: use same enums for command_complete
  lsi53c895a: always use enum constants for s->waiting
  ncr710: simplify ncr710_clear_pending_irq
  ncr710: reuse ncr710_clear_pending_irq in ncr10_do_command
  ncr710: remove weird p->req == NULL case
  ncr710: remove redundant req->hba_private assignment
  ncr710: clean up ncr710_transfer_data
  ncr710: do not load s->current in advance
  ncr710: remove dead message in actions
  ncr710: copy reference counting fixes over from lsi53c895a
  ncr710: unify two conditionals

 hw/scsi/ncr53c710.h  |   7 +-
 hw/scsi/lsi53c895a.c | 101 ++++++++++++++----------
 hw/scsi/ncr53c710.c  | 177 +++++++++++++++++++------------------------
 3 files changed, 146 insertions(+), 139 deletions(-)

-- 
2.53.0