qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH v2 04/23] spapr: Support ibm, lrdr-capacity


From: David Gibson
Subject: Re: [Qemu-devel] [RFC PATCH v2 04/23] spapr: Support ibm, lrdr-capacity device tree property
Date: Wed, 25 Mar 2015 11:15:55 +1100
User-agent: Mutt/1.5.23 (2014-03-12)

On Mon, Mar 23, 2015 at 07:05:45PM +0530, Bharata B Rao wrote:
> Add support for ibm,lrdr-capacity since this is needed by the guest
> kernel to know about the possible hot-pluggable CPUs and Memory. With
> this, pseries kernels will start reporting correct maxcpus in
> /sys/devices/system/cpu/possible.
> 
> Define minimum hotpluggable memory size as 256MB and start storing maximum
> possible memory for the guest in sPAPREnvironment.

[snip]
> @@ -666,6 +668,18 @@ int spapr_rtas_device_tree_setup(void *fdt, hwaddr 
> rtas_addr,
>          }
>  
>      }
> +
> +    lrdr_capacity[0] = cpu_to_be32(spapr->maxram_limit >> 32);
> +    lrdr_capacity[1] = cpu_to_be32(spapr->maxram_limit & 0xffffffff);
> +    lrdr_capacity[2] = 0;
> +    lrdr_capacity[3] = cpu_to_be32(SPAPR_MEMORY_BLOCK_SIZE);
> +    lrdr_capacity[4] = cpu_to_be32(max_cpus/smp_threads);
> +    ret = qemu_fdt_setprop(fdt, "/rtas", "ibm,lrdr-capacity", lrdr_capacity,
> +                     sizeof(lrdr_capacity));
> +    if (ret < 0) {
> +        fprintf(stderr, "Couldn't add ibm,lrdr-capacity rtas property\n");

This should probably be report_error() these days.

Otherwise,

Reviewed-by: David Gibson <address@hidden>

-- 
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: pgpKqjXMFk00Y.pgp
Description: PGP signature


reply via email to

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