qemu-ppc
[Top][All Lists]
Advanced

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

Re: [PATCH 1/1] spapr/rtas: Add MinMem to ibm,get-system-parameter RTAS


From: David Gibson
Subject: Re: [PATCH 1/1] spapr/rtas: Add MinMem to ibm,get-system-parameter RTAS call
Date: Mon, 23 Mar 2020 14:24:57 +1100

On Fri, Mar 20, 2020 at 09:39:22PM -0300, Leonardo Bras wrote:
> Add support for MinMem SPLPAR Characteristic on emulated
> RTAS call ibm,get-system-parameter.
> 
> MinMem represents Minimum Memory, that is described in LOPAPR as:
> The minimum amount of main store that is needed to power on the
> partition. Minimum memory is expressed in MB of storage.

Where exactly does LoPAPR say that?  The version I'm looking at
doesn't describe MinMem all that clearly, other than to say it must be
<= DesMem, which currently has the same value here.

> This  provides a way for the OS to discern hotplugged LMBs and
> LMBs that have started with the VM, allowing it to better provide
> a way for memory hot-removal.

This seems a bit dubious.  Surely we should have this information from
the dynamic-reconfiguration-memory stuff already?  Trying to discern
this from purely a number seems very fragile - wouldn't that mean
making assumptions about how qemu / the host is laying out it's fixed
and dynamic memory which might not be justified?


> 
> Signed-off-by: Leonardo Bras <address@hidden>
> ---
>  hw/ppc/spapr_rtas.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c
> index 9fb8c8632a..0f3fbca7af 100644
> --- a/hw/ppc/spapr_rtas.c
> +++ b/hw/ppc/spapr_rtas.c
> @@ -276,10 +276,12 @@ static void rtas_ibm_get_system_parameter(PowerPCCPU 
> *cpu,
>  
>      switch (parameter) {
>      case RTAS_SYSPARM_SPLPAR_CHARACTERISTICS: {
> -        char *param_val = g_strdup_printf("MaxEntCap=%d,"
> +        char *param_val = g_strdup_printf("MinMem=%" PRIu64 ","
> +                                          "MaxEntCap=%d,"
>                                            "DesMem=%" PRIu64 ","
>                                            "DesProcs=%d,"
>                                            "MaxPlatProcs=%d",
> +                                          ms->ram_size / MiB,
>                                            ms->smp.max_cpus,
>                                            ms->ram_size / MiB,
>                                            ms->smp.cpus,

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


reply via email to

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