From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Var4R-0004Uz-02 for qemu-devel@nongnu.org; Mon, 28 Oct 2013 13:57:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Var4K-0007kr-Ux for qemu-devel@nongnu.org; Mon, 28 Oct 2013 13:57:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33319) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Var4K-0007kh-JS for qemu-devel@nongnu.org; Mon, 28 Oct 2013 13:57:36 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9SHvYrJ032171 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 28 Oct 2013 13:57:34 -0400 Date: Mon, 28 Oct 2013 20:00:23 +0200 From: "Michael S. Tsirkin" Message-ID: <20131028180023.GD14339@redhat.com> References: <1382978620-16641-1-git-send-email-pbonzini@redhat.com> <20131028171653.GA14263@redhat.com> <526E9E62.5010709@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <526E9E62.5010709@redhat.com> 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: Paolo Bonzini Cc: qemu-devel@nongnu.org On Mon, Oct 28, 2013 at 06:26:58PM +0100, Paolo Bonzini wrote: > 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 Hmm. Actually maybe there was an io error... is there an easy way to find out? > > 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); > > } > > } > >