From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vaqar-0007XS-9t for qemu-devel@nongnu.org; Mon, 28 Oct 2013 13:27:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vaqal-0006Vc-5H for qemu-devel@nongnu.org; Mon, 28 Oct 2013 13:27:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44087) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vaqak-0006VJ-Oq for qemu-devel@nongnu.org; Mon, 28 Oct 2013 13:27:03 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9SHR1An012671 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 28 Oct 2013 13:27:01 -0400 Message-ID: <526E9E62.5010709@redhat.com> Date: Mon, 28 Oct 2013 18:26:58 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1382978620-16641-1-git-send-email-pbonzini@redhat.com> <20131028171653.GA14263@redhat.com> In-Reply-To: <20131028171653.GA14263@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [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: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org Il 28/10/2013 18:16, Michael S. Tsirkin ha scritto: > On Mon, Oct 28, 2013 at 05:43:16PM +0100, Paolo Bonzini wrote: >> 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. > > Well ATM win7 boot is broken with non NCQ (crash on boot). > Do you patches help? No, these are for another feature that is missing for AHCI, that is support for stopping the VM on I/O errors. It is https://bugzilla.redhat.com/show_bug.cgi?id=887844 > Also, without NCQ win 7 boot will sometime hang. > The following patch by Alex makes it behave better: > it still sometimes hangs for a very long time but with the patch it > will after a long time proceed. Sometimes it proceeds normally. Yeah, I saw you and Kevin discuss it on IRC. Paolo > diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c > index a8be62c..fbea9e8 100644 > --- a/hw/ide/ahci.c > +++ b/hw/ide/ahci.c > @@ -961,7 +961,8 @@ static int handle_cmd(AHCIState *s, int port, int slot) > /* We're ready to process the command in FIS byte 2. */ > ide_exec_cmd(&s->dev[port].port, cmd_fis[2]); > > - if (s->dev[port].port.ifs[0].status & READY_STAT) { > + if ((s->dev[port].port.ifs[0].status & (READY_STAT|DRQ_STAT|BUSY_STAT)) == > + READY_STAT) { > ahci_write_fis_d2h(&s->dev[port], cmd_fis); > } > } >