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 <da...@gibson.dropbear.id.au> -- 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
pgpAY7HU1JfF4.pgp
Description: PGP signature