[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 34/40] machine: add default_ram_size to machine c
From: |
Laurent Desnogues |
Subject: |
Re: [Qemu-devel] [PULL 34/40] machine: add default_ram_size to machine class |
Date: |
Fri, 5 Jun 2015 09:27:18 +0200 |
Hello,
On Wed, Jun 3, 2015 at 11:45 PM, Alexander Graf <address@hidden> wrote:
> From: Nikunj A Dadhania <address@hidden>
>
> 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.
>
> Add helpers [K,M,G,T,P,E]_BYTE for better readability and easy usage
>
> Signed-off-by: Nikunj A Dadhania <address@hidden>
> Reviewed-by: Thomas Huth <address@hidden>
> Reviewed-by: David Gibson <address@hidden>
> Acked-by: Paolo Bonzini <address@hidden>
> Signed-off-by: David Gibson <address@hidden>
> Signed-off-by: Alexander Graf <address@hidden>
> ---
> hw/core/machine.c | 9 +++++++++
> include/hw/boards.h | 1 +
> include/qemu-common.h | 6 ++++++
> vl.c | 30 ++++++++++++++++--------------
> 4 files changed, 32 insertions(+), 14 deletions(-)
>
[...]
> diff --git a/include/qemu-common.h b/include/qemu-common.h
> index 6b373ff..d52d09c 100644
> --- a/include/qemu-common.h
> +++ b/include/qemu-common.h
> @@ -186,6 +186,12 @@ int64_t strtosz(const char *nptr, char **end);
> int64_t strtosz_suffix(const char *nptr, char **end, const char
> default_suffix);
> int64_t strtosz_suffix_unit(const char *nptr, char **end,
> const char default_suffix, int64_t unit);
> +#define K_BYTE (1ULL << 10)
> +#define M_BYTE (1ULL << 20)
> +#define G_BYTE (1ULL << 30)
> +#define T_BYTE (1ULL << 40)
> +#define P_BYTE (1ULL << 50)
> +#define E_BYTE (1ULL << 60)
>
> /* used to print char* safely */
> #define STR_OR_NULL(str) ((str) ? (str) : "null")
> diff --git a/vl.c b/vl.c
> index 1d4c089..6c7e4e4 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -120,8 +120,6 @@ int main(int argc, char **argv)
> #include "qom/object_interfaces.h"
> #include "qapi-event.h"
>
> -#define DEFAULT_RAM_SIZE 128
This define is still used in qemu-options.hx. We now get this out of "qemu -h":
-m[emory] [size=]megs[,slots=n,maxmem=size]
configure guest RAM
size: initial amount of guest memory (default:
DEFAULT_RAM_SIZEMiB)
slots: number of hotplug slots (default: none)
maxmem: maximum amount of guest memory (default: none)
Thanks,
Laurent
- [Qemu-devel] [PULL 29/40] spapr_pci: add dynamic-reconfiguration option for spapr-pci-host-bridge, (continued)
- [Qemu-devel] [PULL 29/40] spapr_pci: add dynamic-reconfiguration option for spapr-pci-host-bridge, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 17/40] hw/ppc/spapr: Fix error message when firmware could not be loaded, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 21/40] spapr_rtas: add get/set-power-level RTAS interfaces, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 11/40] spapr_pci: Make find_phb()/find_dev() public, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 22/40] spapr_rtas: add set-indicator RTAS interface, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 27/40] spapr_events: event-scan RTAS interface, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 39/40] tcg: add TCG_TARGET_TLB_DISPLACEMENT_BITS, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 25/40] spapr_rtas: add ibm, configure-connector RTAS interface, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 40/40] softmmu: support up to 12 MMU modes, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 34/40] machine: add default_ram_size to machine class, Alexander Graf, 2015/06/03
- Re: [Qemu-devel] [PULL 34/40] machine: add default_ram_size to machine class,
Laurent Desnogues <=
- [Qemu-devel] [PULL 36/40] pseries: Enable in-kernel H_LOGICAL_CI_{LOAD, STORE} implementations, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 28/40] spapr_drc: add spapr_drc_populate_dt(), Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 19/40] docs: add sPAPR hotplug/dynamic-reconfiguration documentation, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 26/40] spapr_events: re-use EPOW event infrastructure for hotplug events, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 32/40] spapr_pci: enable basic hotplug operations, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 20/40] spapr_drc: initial implementation of sPAPRDRConnector device, Alexander Graf, 2015/06/03
- Re: [Qemu-devel] [PULL 00/40] ppc patch queue 2015-06-03, Peter Maydell, 2015/06/04
- Re: [Qemu-devel] [PULL 00/40] ppc patch queue 2015-06-03, Peter Maydell, 2015/06/05