On Tue, 22 Mar 2011 04:47:18 am Peter Maydell wrote: > This fairly simple patchset adds a new 'max_ram' field to the QEMUMachine > structure so that a board model can specify the maximum RAM it will accept. > We can then produce a friendly diagnostic message when the user tries to > start qemu with a '-m' option asking for more RAM than that. (Currently > most of the ARM devboard models respond with an obscure guest crash when > the guest tries to access RAM and finds device registers instead.) As a user, I've been bitten by this. Without understanding how qemu works, the problem is quite surprising: "all I've done is increased the RAM, and now it just crashes".
I don't think my review of the code will count for much, and I'd prefer to see the code added rather than not, but you could move the cmd.c macros (MEGABYTES and TO_MEGABYTES) to some common header and just use those. They are pretty ugly though... Brad