* [Qemu-devel] qemu vl.c hw/omap.c @ 2007-12-04 0:10 Andrzej Zaborowski 2007-12-04 1:02 ` Paul Brook 0 siblings, 1 reply; 6+ messages in thread From: Andrzej Zaborowski @ 2007-12-04 0:10 UTC (permalink / raw) To: qemu-devel CVSROOT: /sources/qemu Module name: qemu Changes by: Andrzej Zaborowski <balrog> 07/12/04 00:10:35 Modified files: . : vl.c hw : omap.c 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. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/vl.c?cvsroot=qemu&r1=1.375&r2=1.376 http://cvs.savannah.gnu.org/viewcvs/qemu/hw/omap.c?cvsroot=qemu&r1=1.27&r2=1.28 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] qemu vl.c hw/omap.c 2007-12-04 0:10 [Qemu-devel] qemu vl.c hw/omap.c Andrzej Zaborowski @ 2007-12-04 1:02 ` Paul Brook 2007-12-04 1:11 ` andrzej zaborowski 0 siblings, 1 reply; 6+ messages in thread From: Paul Brook @ 2007-12-04 1:02 UTC (permalink / raw) To: qemu-devel > 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 general case should be a hotplugable interface, with cold-plug interfaces (e.g. IDE harddrives) being the exception. Paul ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] qemu vl.c hw/omap.c 2007-12-04 1:02 ` Paul Brook @ 2007-12-04 1:11 ` andrzej zaborowski 2007-12-04 1:20 ` Paul Brook 0 siblings, 1 reply; 6+ messages in thread From: andrzej zaborowski @ 2007-12-04 1:11 UTC (permalink / raw) To: Paul Brook; +Cc: qemu-devel On 04/12/2007, Paul Brook <paul@codesourcery.com> 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. So this needs to be fixed but this commit was a quick fix for the regression from the -drive patch. Regards ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] qemu vl.c hw/omap.c 2007-12-04 1:11 ` andrzej zaborowski @ 2007-12-04 1:20 ` Paul Brook 2007-12-04 1:28 ` andrzej zaborowski 2007-12-04 9:28 ` Laurent Vivier 0 siblings, 2 replies; 6+ messages in thread From: Paul Brook @ 2007-12-04 1:20 UTC (permalink / raw) To: qemu-devel On Tuesday 04 December 2007, andrzej zaborowski wrote: > On 04/12/2007, Paul Brook <paul@codesourcery.com> 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. Paul ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] qemu vl.c hw/omap.c 2007-12-04 1:20 ` Paul Brook @ 2007-12-04 1:28 ` andrzej zaborowski 2007-12-04 9:28 ` Laurent Vivier 1 sibling, 0 replies; 6+ messages in thread From: andrzej zaborowski @ 2007-12-04 1:28 UTC (permalink / raw) To: Paul Brook; +Cc: qemu-devel On 04/12/2007, Paul Brook <paul@codesourcery.com> wrote: > On Tuesday 04 December 2007, andrzej zaborowski wrote: > > On 04/12/2007, Paul Brook <paul@codesourcery.com> 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] qemu vl.c hw/omap.c 2007-12-04 1:20 ` Paul Brook 2007-12-04 1:28 ` andrzej zaborowski @ 2007-12-04 9:28 ` Laurent Vivier 1 sibling, 0 replies; 6+ messages in thread From: Laurent Vivier @ 2007-12-04 9:28 UTC (permalink / raw) To: qemu-devel [-- Attachment #1: Type: text/plain, Size: 1708 bytes --] Le mardi 04 décembre 2007 à 01:20 +0000, Paul Brook a écrit : > On Tuesday 04 December 2007, andrzej zaborowski wrote: > > On 04/12/2007, Paul Brook <paul@codesourcery.com> 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. Hi Paul, I think Andrzez is doing it correctly. He only adds an entry in drives_table[] without creating any bdrv (because he doesn't provide file). Then in omap.c, he creates the device, not the media. And as Palm Tunsgten is the only machine calling omap310_mpu_init(), the device is only created for it. And then he will be able to introduce card (file) in the SD reader. Laurent -- ------------- Laurent.Vivier@bull.net -------------- "Any sufficiently advanced technology is indistinguishable from magic." - Arthur C. Clarke [-- Attachment #2: Ceci est une partie de message numériquement signée --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-12-04 9:29 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-12-04 0:10 [Qemu-devel] qemu vl.c hw/omap.c Andrzej Zaborowski 2007-12-04 1:02 ` Paul Brook 2007-12-04 1:11 ` andrzej zaborowski 2007-12-04 1:20 ` Paul Brook 2007-12-04 1:28 ` andrzej zaborowski 2007-12-04 9:28 ` Laurent Vivier
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).