From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46975) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YaZBz-0007CI-1m for qemu-devel@nongnu.org; Tue, 24 Mar 2015 20:29:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YaZBu-0003w0-OJ for qemu-devel@nongnu.org; Tue, 24 Mar 2015 20:29:07 -0400 Date: Wed, 25 Mar 2015 11:15:55 +1100 From: David Gibson Message-ID: <20150325001555.GN25043@voom.fritz.box> References: <1427117764-23008-1-git-send-email-bharata@linux.vnet.ibm.com> <1427117764-23008-5-git-send-email-bharata@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Wi2ae8OABxFj6q5L" Content-Disposition: inline In-Reply-To: <1427117764-23008-5-git-send-email-bharata@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [RFC PATCH v2 04/23] spapr: Support ibm, lrdr-capacity device tree property List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bharata B Rao Cc: mdroth@linux.vnet.ibm.com, agraf@suse.de, qemu-devel@nongnu.org, qemu-ppc@nongnu.org, tyreld@linux.vnet.ibm.com, nfont@linux.vnet.ibm.com, imammedo@redhat.com, afaerber@suse.de --Wi2ae8OABxFj6q5L Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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 r= tas_addr, > } > =20 > } > + > + lrdr_capacity[0] =3D cpu_to_be32(spapr->maxram_limit >> 32); > + lrdr_capacity[1] =3D cpu_to_be32(spapr->maxram_limit & 0xffffffff); > + lrdr_capacity[2] =3D 0; > + lrdr_capacity[3] =3D cpu_to_be32(SPAPR_MEMORY_BLOCK_SIZE); > + lrdr_capacity[4] =3D cpu_to_be32(max_cpus/smp_threads); > + ret =3D qemu_fdt_setprop(fdt, "/rtas", "ibm,lrdr-capacity", lrdr_cap= acity, > + 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 --=20 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 --Wi2ae8OABxFj6q5L Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVEf47AAoJEGw4ysog2bOSPRwQANLD6j4XsHmH7BcO8P8OqY2C zZG1LTJhwADIvPPjzQEfF7Uvgk3Uj24EyKqbttxgkfUEr77Dkd4Lu3lPuIvADpsV WQhou3GnasJNb1Rp7AVeKqqDZvkmfiXMOnsAajSrPp/sfb7h5y0Wj5IorEBo0jjz CIhHQ6qjk5HkhkHkzD7+okHUxhYcwylf+VyCXvpvQJ1+VqpOC0J1BYp4UgQP+IVB PEuGuDa20pu0plhBV46HAqCsog/blg3ui4elFMtL/6law0ukWjeku0ukFKqOh5Op 9YBY3L4o4FomLPQOKhBD32e+kkfgUJLkVPxuHaNfcz1jb/2MW3Qmz3aLVSEILhjl McT8FolXL9lekyUhtl1Amz/lUh7Z0BoU9nlIXjqOJ0VPXGbowSeSMh6nU0PBBp8k Kn0Ep5Z6pSul6pHdEHiGojMOayyhcgNs+IMKRwWKe3jGektyH1CTfKgjN5dGch8z 0/AU3Oc0sIOxlysuXzPNope1ak8IJTB84445H7Y23HaFOB722STUlB9KxR+2Cctp vwLEvMdbiloAwQjX50aMg3cnDbRetc9Cyg+PHA/1bUQb4zVTFEtjS1oc6iWqgbld XtFwO/mNRi88M/Ns52yG/+0sY5HCMGPmPREQI8rqxTNmn6FnPZ0DdE4aUFWOBNWH mF4um8OQ+UnzOFdh1lKv =xSwS -----END PGP SIGNATURE----- --Wi2ae8OABxFj6q5L--