qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 1/2] machine: add default_ram_size to machine


From: Nikunj A Dadhania
Subject: Re: [Qemu-devel] [PATCH v3 1/2] machine: add default_ram_size to machine class
Date: Thu, 05 Mar 2015 16:24:21 +0530
User-agent: Notmuch/0.17+27~gae47d61 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-redhat-linux-gnu)

Thomas Huth <address@hidden> writes:

> On Thu, 05 Mar 2015 16:01:40 +0530
> Nikunj A Dadhania <address@hidden> wrote:
>
>> Hi Igor,
>> 
>> Thanks for the review.
>> 
>> Igor Mammedov <address@hidden> writes:
>> > On Thu,  5 Mar 2015 14:36:10 +0530
>> > Nikunj A Dadhania <address@hidden> wrote:
>> >
>> >> Machines types can have different requirement for default ram
>> >> size. Introduce a member in the machine class and set the current
>> >> default_ram_size to 128MB.
>> >> 
>> >> For QEMUMachine types override the value during the registration of
>> >> the machine and for MachineClass introduce the generic class init
>> >> setting the default_ram_size.
>> >> 
>> >> In case the user passes memory that is lesser that the default ram
>> >> size, upscale the value to the machine's default ram size with a
>> >> warning.
> ...
>> >> @@ -2684,6 +2683,12 @@ static void set_memory_options(uint64_t 
>> >> *ram_slots, ram_addr_t *maxram_size)
>> >>          exit(EXIT_FAILURE);
>> >>      }
>> >>  
>> >> +    if (ram_size < default_ram_size) {
>> >> +        fprintf(stderr, "WARNING: qemu: %s guest ram size defaulting to 
>> >> %ld MB\n",
>> >> +                mc->name, default_ram_size / (1024 * 1024));
>> >> +        ram_size = default_ram_size;
>> >> +    }
>> > In previous review someone explicitly asked not to override lower ram_size
>> > if it was requested by user on command line.
>> 
>> We would get to a state where the VM is not bootable. I understand that
>> user has provided a value, but what if the value is not correct?
>
> Well, as I said before: There are older versions of Linux which run fine
> with 128 MB or even 64 MB of memory. Do you really want to block this
> just because newer Linux distros now need more RAM now by default?
> IMHO if the user specified the amount of RAM at the command line, you
> can assume that they know what they are doing.

Sure, I can then just use that input without warning/rejection.

Regards
Nikunj





reply via email to

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