Received: from eggs.gnu.org ([2001:4830:134:3::10]:58548) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wv0vD-00057j-Mu for qemu-devel@nongnu.org; Thu, 12 Jun 2014 05:03:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wv0v7-0005qM-6R for qemu-devel@nongnu.org; Thu, 12 Jun 2014 05:03:47 -0400 Received: from oxygen.pond.sub.org ([144.76.244.19]:39011) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wv0v7-0005q1-0t for qemu-devel@nongnu.org; Thu, 12 Jun 2014 05:03:41 -0400 From: Markus Armbruster References: <5396A617.5020209@msgid.tls.msk.ru> <5396A6E7.8030400@redhat.com> <5396BD5C.6010507@msgid.tls.msk.ru> Date: Thu, 12 Jun 2014 11:03:36 +0200 In-Reply-To: <5396BD5C.6010507@msgid.tls.msk.ru> (Michael Tokarev's message of "Tue, 10 Jun 2014 12:10:04 +0400") Message-ID: <87y4x2xzx3.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] Are -cdrom/-hda (or -drive if=ide) supposed to work in q35? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev Cc: Kevin Wolf , Paolo Bonzini , qemu-devel , Andreas =?utf-8?Q?F=C3=A4rber?= Michael Tokarev writes: > 10.06.2014 10:34, Paolo Bonzini wrote: >> Il 10/06/2014 08:30, Michael Tokarev ha scritto: >>> Hello. >>> >>> The question is: are the drive shortcuts - -cdrom, -hda, -hdb etc - >>> supposed to work in -machine q35 too? Or are they merely ignored? >>> >>> qemu-system-x86_64 -machine q35 -cdrom foo.img > [] >> It should work. I remember some complications due to AHCI not >> having slaves, but it is a bug. > > It looks like the "short" -drive if=ide option does not connect the > created drive to any bus at all. With the above command, or with > -drive if=ide,index=*,bus=*, info qtree does not show the drive at > all. While -drive if=none,id=X -device ide-cd,drive=X connects the > drive to the right bus just fine. -drive mixes up configuration of backend and frontend (a.k.a. device model), as follows: 1. It always defines a backend. "info block" shows them. 2. It always defines a few frontend configuration bits for the device models to pick up. 3. Except with if=none, it posts a request to board code to create a suitable frontend. It's up to the board code to honor, reject or ignore the request. The i440FX boards honor it, the Q35 boards ignore it. Nobody has gotten around to making the Q35 boards honor it, in part because there has been some confusion on what if=ide is supposed to mean on Q35. Should it connect an ide-hd / ide-cd in SATA mode or in legacy PATA mode? I've always argued for SATA, because for me if=ide does *not* imply a specific kind of HBA any more than if=scsi does, and the "natural" HBA for Q35 is AHCI in SATA mode. Kevin (cc'ed) has argued for a way to make it connect in legacy PATA mode. I'd be fine with that, as long as it's off by default. Patches welcome. > Again, should this drive be visible in qtree? At least with -M pc, > similarly added devices are shown properly there. IDE devices such as ide-hd and ide-cd should all be visible in "info qdev" on any of our PC machines. "info qdev" can't show non-qdevified devices (read: stuff that still hasn't been updated to not-really-new-anymore APIs), or "busless" devices (read: stuff using newer APIs going beyond some simplistic qdev assumptions baked into "info qtree"). If I remember correctly, Andreas (cc'ed) has code to let you introspect any modern device.