Peter Maydell <peter.mayd...@linaro.org> writes:

> On 5 March 2015 at 19:24, Nikunj A Dadhania <nik...@linux.vnet.ibm.com> wrote:
>> Rejection is also change of behaviour. Because till now, a VM would
>> start with any memory size, even if it's less that 128MB
>> (default_ram_size). With rejection, all those VMs would fail booting
>> displaying the warning. Is this OK?
>
> No. Not all of the machines we emulate are modern machines with
> gigabytes of memory -- some are very small boards which might
> really only have 64K of RAM. If the user asks for 64K you should
> do what they ask.
>
> If what you want is to reject user specified memory sizes which
> are too small, this is a "minimum RAM size", which is different
> from "default RAM size". It would also be nice to have a
> "maximum RAM size", so we can avoid weird failures if the user
> asks for 1GB on a board which only has 256MB of space for RAM
> in its address map.

Yes, [min,max]_ram_size is more appropriate. At present, I have sent a
v4 without changing the default behaviour when user has provided an
option.


> Somebody may be along shortly to complain that this doesn't account
> for machines where you can only add RAM one DRAM stick at a time
> and so 64MB, 128MB and 256MB might all be valid but 100MB not.

Yes, and these would help memory hotplug as well.

> At least, that's what happened a few years ago when I tried to
> suggest something like these per-board properties...
>
> -- PMM

Regards
Nikunj


Reply via email to