From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43538) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTRke-0003ew-K2 for qemu-devel@nongnu.org; Thu, 05 Mar 2015 04:07:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YTRka-00041E-Ey for qemu-devel@nongnu.org; Thu, 05 Mar 2015 04:07:28 -0500 Received: from e23smtp03.au.ibm.com ([202.81.31.145]:38524) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTRkZ-0003wQ-MB for qemu-devel@nongnu.org; Thu, 05 Mar 2015 04:07:24 -0500 Received: from /spool/local by e23smtp03.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 5 Mar 2015 19:07:18 +1000 From: Nikunj A Dadhania Date: Thu, 5 Mar 2015 14:36:09 +0530 Message-Id: <1425546371-15909-1-git-send-email-nikunj@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH v3 0/2] Introduce default ram size in MachineClass List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: thuth@linux.vnet.ibm.com, nikunj@linux.vnet.ibm.com, aik@ozlabs.ru, agraf@suse.de, armbru@redhat.com, qemu-ppc@nongnu.org, marcel.apfelbaum@gmail.com, imammedo@redhat.com Current DEFAULT_RAM_SIZE(128MB) enforced by QEMU would not work for all machines. Introduce a default_ram_size as part of MachineClass. The below patches has following behaviour: 1) If the user does not provide "-m" option, machine's default ram size will be picked. 2) In case the user provides memory that is lesser than machine's default ram size, we upscale the ram_size to machine's default_ram_size. A warning is displayed for the change that qemu has done. On the side note, there are other cleanup of removing ram_size, slots and maxmem from vl.c. All these are being parsed by generic code. This can be moved to machine specific property. I will take a stab at it next. Nikunj A Dadhania (2): machine: add default_ram_size to machine class spapr: override default ram size 1GB hw/core/machine.c | 8 ++++++++ hw/ppc/spapr.c | 2 ++ include/hw/boards.h | 4 ++++ vl.c | 29 +++++++++++++++++------------ 4 files changed, 31 insertions(+), 12 deletions(-) -- 1.8.3.1