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 <controller type='sata'> 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