On 1 October 2013 21:16, Gerd Hoffmann <kra...@redhat.com> wrote: > Hi, > >> -bios we're stuck with because it's a legacy >> option, > > What is legacy about it?
The fact that we've had it since forever, it was introduced for a specific x86 use case and has since accreted behaviour rather than being designed. >> >> Why is this a machine option rather than a property of >> >> the ROM/flash device? >> > >> > Not all machines have a flash device. >> >> No, but they must have *something* that the firmware code lives in... > > Some don't. They just memcpy the firmware into guest ram instead. ...is that a good thing? What does the real hardware do? Should we be doing that instead? Isn't this awkward on reset? >> > Also flash drives don't want a >> > simple (readonly) image file but a (writable) blockdev as backing >> > storage, at least the pflash device emulation I've briefly looked at. >> >> ...so how does this work for machines where the firmware lives in >> a flash device? > > pc: In case '-pflash $blockdev' is present '-bios $image' is ignored. > > My patch doesn't change that behavior, i.e. -machine firmware=$image is > ignored too in case -plflash is present on the command line. > > Given that pflash operates on a blockdev I don't see a obvious way to > change that ... We could make pflash accept a plain file which is then used as the read-only initialization for a blockdev which isn't backed by anything, for example. That would be useful for other pflash usage scenarios too. -- PMM