From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43154) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTEjJ-0003M5-1F for qemu-devel@nongnu.org; Tue, 30 Oct 2012 12:31:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTEjC-0002PI-91 for qemu-devel@nongnu.org; Tue, 30 Oct 2012 12:31:52 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:63869) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTEjC-0002OP-2Z for qemu-devel@nongnu.org; Tue, 30 Oct 2012 12:31:46 -0400 Received: by mail-pa0-f45.google.com with SMTP id fb10so273053pad.4 for ; Tue, 30 Oct 2012 09:31:45 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <509000E8.9090703@redhat.com> Date: Tue, 30 Oct 2012 17:31:36 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <87k3u82f7b.fsf@blackfin.pond.sub.org> In-Reply-To: <87k3u82f7b.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] On block interface types in general, IF_AHCI in particular List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Kevin Wolf , Anthony Liguori , Jason Baron , qemu-devel@nongnu.org, Alexander Graf , Gerd Hoffmann , Stefan Hajnoczi Il 30/10/2012 15:43, Markus Armbruster ha scritto: > The argument that we must have IF_AHCI because AHCI needs different > guest OS drivers than IDE doesn't hold water. Plenty of precedence > above: IF_IDE can get you an ide-hd connected to some IDE controller, or > a virtio-blk-s390 device That was a bad shortcut for introducing default_if. Shame on Alex. :) > , and IF_SCSI can get you a scsi-hd connected to > totally different SCSI HBAs. I can't see why IF_IDE giving you an > ide-hd connected to ich9-ahci on q35 would be any different. > > There's a related argument that I find more compelling: we may want > if=ahci to let users choose nicely between IDE and AHCI. Makes sense > only if we have boards providing both kind of controllers onboard. q35 > doesn't. I think the main problem is that we haven't hashed out the requirements. Since this is QEMU and not libvirt (which uses -drive if=none / -device anyway), I suppose we mostly care about direct command-line start. We want "qemu-kvm winxp.img" to work, even if q35 is now the default machine. This calls for making IDE (not AHCI) the default. Note that libvirt already went for (effectively) if=ahci, because they support a XML element. But libvirt does not care about verbosity, because their XML is not meant to be typed on the command line. They do have some magic in order to create default controllers but not to the level of QEMU. The main drawback of if=ahci is, as pointed out by Markus, that you would have to provide both controllers on-board. I think a real ICH9 has the compatibility IDE controller on a separate PCI address from the SATA controller, so creating both of them is not really out of question. Obvious disadvantage, it would depart from real hardware. Linux should not care, not sure about SeaBIOS and Windows. At the same time, if all we want is a quick way to switch between IDE and AHCI, we could just use machine types. So another proposal is to have two machine types, one for ICH9-IDE (pc, the default), one for ICH9-AHCI (q35), one for PIIX3-IDE (piix3). Each QEMU release would add (up to) three machine types. Paolo