From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IzMaA-0000Pr-Kf for qemu-devel@nongnu.org; Mon, 03 Dec 2007 20:28:18 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IzMa9-0000PH-Dm for qemu-devel@nongnu.org; Mon, 03 Dec 2007 20:28:18 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IzMa9-0000PA-1E for qemu-devel@nongnu.org; Mon, 03 Dec 2007 20:28:17 -0500 Received: from ug-out-1314.google.com ([66.249.92.175]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IzMa8-0007X3-U7 for qemu-devel@nongnu.org; Mon, 03 Dec 2007 20:28:17 -0500 Received: by ug-out-1314.google.com with SMTP id m2so1175uge for ; Mon, 03 Dec 2007 17:28:15 -0800 (PST) Message-ID: Date: Tue, 4 Dec 2007 02:28:15 +0100 From: "andrzej zaborowski" Subject: Re: [Qemu-devel] qemu vl.c hw/omap.c In-Reply-To: <200712040120.26286.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200712040102.03664.paul@codesourcery.com> <200712040120.26286.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org On 04/12/2007, Paul Brook wrote: > On Tuesday 04 December 2007, andrzej zaborowski wrote: > > On 04/12/2007, Paul Brook wrote: > > > > Log message: > > > > Always create an SD bdrv, so that PXA and OMAP boards can boot > > > > with no card inserted again. Eventually SD, CDROM and floppy should > > > > all be registered conditionally depending on machine. > > > > > > This seems the wrong way to solve this problem. The SD emulation should > > > be able to cope with no device being present. > > > > The bdrv's represent the concept of "drive" rather than "media", and > > also in the case the bdrv must be present whenever there is a SD slot, > > not an SD card (so that monitor command change and eject can be used). > > I agree that not all machines have an SD slot, as not all machines > > have a cd-rom drive or floppy drive. > > Right, but I think you're going in the wrong direction. Most scsi interfaces > do support hotplug of devices. For USB mass storage the whole controller is > hotplug. Pre-allocating all possible devices simply doesn't scale. We don't pre-allocate all possible devices, only the "drives" which are integral part of the machine (as is the case of the SD slot in a Zaurus, soldered to the PCB). New bdrv's can still be added and removed in runtime for hotplugged devices and I have no intetion to change that. If you want to use the hotplugging-like mechanism for inserting removable media like SD, CD or floppy, that would mean scrapping the whole bdrv_is_removable(), bdrv_is_inserted(), bdrv_media_changed() api. Regards