Skip to content

IDE cleanups, initial work on AHCI rerror/werror=stop

Paolo Bonzini qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest24 patches 24 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/24blkdebug: report errors on flush tooblock/blkdebug.c+20 -01 reply
2/24libqtest: return progress from qmp/qmpvtests/libqtest.c tests/libqtest.h+18 -92 replies
3/24libqtest: add QTEST_LOG for debugging qtest testcasestests/libqtest.c+6 -11 reply
4/24ide-test: add test for werror=stoptests/ide-test.c+74 -00 replies
5/24ide: simplify reset callbackshw/ide/ahci.c hw/ide/core.c hw/ide/internal.h +2 more+6 -130 replies
6/24ide: simplify set_inactive callbackshw/ide/ahci.c hw/ide/core.c hw/ide/internal.h +2 more+5 -151 reply
7/24ide: simplify async_cmd_done callbackshw/ide/ahci.c hw/ide/internal.h+2 -20 replies
8/24ide: simplify start_transfer callbackshw/ide/ahci.c hw/ide/core.c hw/ide/internal.h +2 more+5 -240 replies
9/24ide: wrap start_dma callbackhw/ide/atapi.c hw/ide/core.c hw/ide/internal.h+11 -112 replies
10/24ide: add trigger_irq callbackhw/ide/ahci.c hw/ide/atapi.c hw/ide/internal.h +1 more+19 -54 replies
11/24ide: fold add_status callback into set_inactivehw/ide/ahci.c hw/ide/atapi.c hw/ide/core.c +3 more+15 -340 replies
12/24ide: move BM_STATUS bits to pci.[ch]hw/ide/internal.h hw/ide/pci.c hw/ide/pci.h+11 -110 replies
13/24ide: move retry constants out of BM_STATUS_* namespacehw/ide/core.c hw/ide/internal.h hw/ide/pci.c+23 -231 reply
14/24ide: start extracting ide_restart_dma out of bmdma_restart_dmahw/ide/pci.c+18 -100 replies
15/24ide: prepare to move restart to common codehw/ide/internal.h hw/ide/pci.c+8 -51 reply
16/24ide: introduce ide_register_restart_cbhw/ide/cmd646.c hw/ide/core.c hw/ide/internal.h +2 more+9 -62 replies
17/24ide: do not use BMDMA in restart callbackhw/ide/pci.c+3 -30 replies
18/24ide: pass IDEBus to the restart_cbhw/ide/core.c hw/ide/pci.c+5 -51 reply
19/24ide: move restart callback to common codehw/ide/core.c hw/ide/internal.h hw/ide/pci.c +1 more+67 -700 replies
20/24ide: remove restart_cb callbackhw/ide/ahci.c hw/ide/core.c hw/ide/internal.h +1 more+0 -160 replies
21/24ide: replace set_unit callback with more IDEBus statehw/ide/ahci.c hw/ide/core.c hw/ide/internal.h +3 more+15 -270 replies
22/24ide: place initial state of the current request to IDEBushw/ide/core.c hw/ide/internal.h hw/ide/pci.c +1 more+16 -110 replies
23/24ide: migrate initial request state via IDEBushw/ide/core.c+4 -10 replies
24/24ide: commonize io_buffer_index initializationhw/ide/atapi.c hw/ide/core.c+1 -40 replies

Reviews trailers per patch

2 of 24 patches have a Reviewed-by or Acked-by.

PatchKevin Wolf
1/24R-b
2/24
3/24R-b
4/24
5/24
6/24
7/24
8/24
9/24
10/24
11/24
12/24
13/24
14/24
15/24
16/24
17/24
18/24
19/24
20/24
21/24
22/24
23/24
24/24

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Qemu-devel] [WIP PATCH 00/24] IDE cleanups, initial work on AHCI rerror/werror=stop

Hi all,

this is some cleanup to the IDE code that I started long ago and picked up again on my flight back from KVM Forum...

The patches clean up the callbacks to prepare for implementing request retry for AHCI. After these patches, PIO retry should work for AHCI and non-NCQ retry should be very close (you need an implementation of the new restart_dma callback). NCQ retry and save/restore is AHCI-specific and has to be done separately, similar to how we do it for SCSI already.

Patches 1-4 set up a new (incomplete) testcase. Patches 5-13 are no-op cleanups, or so I hope. Patches 14-23 genericize retry and make it "just work" for all adapters for PIO. Patch 24 is another cleanup that could probably be moved earlier in the series.

Throwing it out since I know Kevin and mst are working on AHCI, to avoid doing duplicate work. Patches 2 and 4 are known to be racy and incomplete. Extremely light testing, if something breaks tells me and I'll look at it.

Paolo

Paolo Bonzini (24):
blkdebug: report errors on flush too
libqtest: return progress from qmp/qmpv
libqtest: add QTEST_LOG for debugging qtest testcases
ide-test: add test for werror=stop
ide: simplify reset callbacks
ide: simplify set_inactive callbacks
ide: simplify async_cmd_done callbacks
ide: simplify start_transfer callbacks
ide: wrap start_dma callback
ide: add trigger_irq callback
ide: fold add_status callback into set_inactive
ide: move BM_STATUS bits to pci.[ch]
ide: move retry constants out of BM_STATUS_* namespace
ide: start extracting ide_restart_dma out of bmdma_restart_dma
ide: prepare to move restart to common code
ide: introduce ide_register_restart_cb
ide: do not use BMDMA in restart callback
ide: pass IDEBus to the restart_cb
ide: move restart callback to common code
ide: remove restart_cb callback
ide: replace set_unit callback with more IDEBus state
ide: place initial state of the current request to IDEBus
ide: migrate initial request state via IDEBus
ide: commonize io_buffer_index initialization

 block/blkdebug.c  |  20 ++++++++
 hw/ide/ahci.c     |  45 +++-------------
 hw/ide/atapi.c    |  14 +++--
 hw/ide/cmd646.c   |   3 +-
 hw/ide/core.c     | 151 +++++++++++++++++++++++++++++++++++++++---------------
 hw/ide/internal.h |  48 ++++++++---------
 hw/ide/macio.c    |  15 ------
 hw/ide/pci.c      | 130 +++++++++++-----------------------------------
 hw/ide/pci.h      |  19 ++++---
 hw/ide/piix.c     |   3 +-
 hw/ide/via.c      |   3 +-
 tests/ide-test.c  |  74 ++++++++++++++++++++++++++
 tests/libqtest.c  |  17 ++++--
 tests/libqtest.h  |  17 +++---
 14 files changed, 307 insertions(+), 252 deletions(-)
Signature · 1 line
1.8.3.1