On Wed, Mar 25, 2015 at 11:15:55AM +1100, David Gibson wrote: > 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.
This file (hw/ppc/spapr_rtas.c) has lots of fprintf calls, may be it's a task for another day to change all these. Regards, Bharata.