qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 0/2] Let boards state maximum RAM limits in QEMU


From: Blue Swirl
Subject: Re: [Qemu-devel] [PATCH 0/2] Let boards state maximum RAM limits in QEMUMachine struct
Date: Sat, 26 Mar 2011 13:41:23 +0200

On Mon, Mar 21, 2011 at 7:47 PM, Peter Maydell <address@hidden> 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.)
>
> If no maximum size is specified we default to the old behaviour of
> "do not impose any limit".
>
> The advantage of doing this in vl.c rather than in each board (apart
> from avoiding code duplication) is that we can distinguish between
> "the user asked for more RAM than we support" (an error) and "the global
> default RAM size is more than our maximum" (just cap the RAM size to
> the board maximum).

This could replace the field max_mem in hwdef structures in sun4m.c.

Another candidate for refactoring would be default_cpu_model.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]