Received: from eggs.gnu.org ([208.118.235.92]:47383) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoAVu-0003W0-E2 for qemu-devel@nongnu.org; Mon, 09 Jul 2012 05:44:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SoAVs-0002ON-HI for qemu-devel@nongnu.org; Mon, 09 Jul 2012 05:44:17 -0400 Received: from cantor2.suse.de ([195.135.220.15]:51710 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoAVs-0002O6-7N for qemu-devel@nongnu.org; Mon, 09 Jul 2012 05:44:16 -0400 Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: Alexander Graf In-Reply-To: <20120709094126.GI15459@redhat.com> Date: Mon, 9 Jul 2012 11:44:11 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1340714974-25489-1-git-send-email-agraf@suse.de> <4FFAA03D.6020302@redhat.com> <4FFAA40E.4070901@redhat.com> <583552B4-7D4C-4030-8792-203BB922000E@suse.de> <20120709094126.GI15459@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2] ahci: add -drive support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gleb Natapov Cc: Kevin Wolf , Markus Armbruster , qemu-devel qemu-devel On 09.07.2012, at 11:41, Gleb Natapov wrote: > On Mon, Jul 09, 2012 at 11:36:47AM +0200, Alexander Graf wrote: >>=20 >> On 09.07.2012, at 11:27, Kevin Wolf wrote: >>=20 >>> Am 09.07.2012 11:13, schrieb Alexander Graf: >>>>=20 >>>> On 09.07.2012, at 11:11, Kevin Wolf wrote: >>>>=20 >>>>> Am 09.07.2012 10:50, schrieb Markus Armbruster: >>>>>> Alexander Graf writes: >>>>>>=20 >>>>>>> We've had support for creating AHCI devices using -device for a = while now, >>>>>>> but it's cumbersome to users. We really should provide an easier = way for >>>>>>> them to leverage the power of AHCI! >>>>>>>=20 >>>>>>> So let's introduce a new if=3D option to -drive, giving users = the same >>>>>>> command line experience as for scsi or ide. >>>>>>>=20 >>>>>>> Signed-off-by: Alexander Graf >>>>>>>=20 >>>>>>> --- >>>>>>>=20 >>>>>>> v1 -> v2: >>>>>>>=20 >>>>>>> - support more than a single drive per adapter >>>>>>> - support index=3D option >>>>>>> - treat IF_AHCI the same as IF_IDE >>>>>>=20 >>>>>> Inhowfar? Not obvious to me from the patch, or the diff patch = v1. >>>>>>=20 >>>>>>> - add is_ata() helper to match AHCI || IDE >>>>>>=20 >>>>>> Not addressed: >>>>>>=20 >>>>>> Once we switch to q35, if=3Dahci will become a redundant wart: to = add >>>>>> drives to the board's AHCI controller, you'll have to use if=3Dide.= >>>>>> if=3Dahci will create new controllers, which is generally not = what you >>>>>> want. Ugh. >>>>>=20 >>>>> Can we even make it the default with q35 as long as our AHCI = controller >>>>> doesn't also expose a legacy interface for compatibility? >>>>=20 >>>> What legacy interface? The ICH-9 can be controlled by the _BIOS_ to = switch between 2 PCI IDs. One for IDE mode, one for AHCI mode. I don't = think that would help us here, would it? >>>=20 >>> I didn't actually look into this much. I just supposed that the >>> existence of an AHCI Enable bit in the GHC register implies that = some >>> compatibility mechanism can be implemented that is transparent to = older >>> OSes. >>=20 >> Yeah, I was hoping the same too when I read the spec back then. = Unfortunately, it's really a firmware configuration bit which doesn't = help us at all. >>=20 >> I think there is a hack in some driver somewhere that on bootup = checks if the AHCI bit is disabled and then forcefully enables it, so = that the device during OS boot magically changes its ID and semantics. = But I don't think we really want to rely on that. IIRC it never went = upstream and I doubt Windows does it. >>=20 > Doesn't enabling the bit change PCI bars size/number? Don't remember, but I think so. It makes it a completely different = device. Alex