From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vapv4-0007NI-P3 for qemu-devel@nongnu.org; Mon, 28 Oct 2013 12:44:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vapuw-0000Lb-BZ for qemu-devel@nongnu.org; Mon, 28 Oct 2013 12:43:58 -0400 Received: from mail-qa0-x22d.google.com ([2607:f8b0:400d:c00::22d]:61593) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vapuw-0000LW-6U for qemu-devel@nongnu.org; Mon, 28 Oct 2013 12:43:50 -0400 Received: by mail-qa0-f45.google.com with SMTP id ii20so2221728qab.18 for ; Mon, 28 Oct 2013 09:43:49 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Mon, 28 Oct 2013 17:43:16 +0100 Message-Id: <1382978620-16641-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [WIP PATCH 00/24] IDE cleanups, initial work on AHCI rerror/werror=stop List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: mst@redhat.com 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(-) -- 1.8.3.1