From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:42424) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPljA-0002GN-Lg for qemu-devel@nongnu.org; Sun, 13 Nov 2011 20:52:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RPlj9-0006NC-Dr for qemu-devel@nongnu.org; Sun, 13 Nov 2011 20:52:52 -0500 Received: from e23smtp03.au.ibm.com ([202.81.31.145]:35917) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPlj8-0006Mw-Kc for qemu-devel@nongnu.org; Sun, 13 Nov 2011 20:52:51 -0500 Received: from /spool/local by e23smtp03.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 14 Nov 2011 01:47:46 +1000 Date: Mon, 14 Nov 2011 12:44:19 +1100 From: David Gibson Message-ID: <20111114014419.GG3807@truffala.fritz.box> References: <1320731536-484-1-git-send-email-david@gibson.dropbear.id.au> <20111108111221.64984a87@BR8GGW75.de.ibm.com> <4EBCFE20.50706@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4EBCFE20.50706@suse.de> Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH] pseries: Correct RAM size check for SLOF List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: qemu-ppc@nongnu.org, Thomas Huth , qemu-devel@nongnu.org On Fri, Nov 11, 2011 at 11:51:12AM +0100, Alexander Graf wrote: > On 11/08/2011 11:12 AM, Thomas Huth wrote: > >Am Tue, 8 Nov 2011 16:52:16 +1100 > >schrieb David Gibson: > > > >>The SLOF firmware used on the pseries machine needs a reasonable amount of > >>(guest) RAM in order to run, so we have a check in the machine init > >>function to check that this is available. However, SLOF runs in real mode > >>(MMU off) which means it can only actually access the RMA (Real Mode Area), > >>not all of RAM. In many cases the RMA is the same as all RAM, but when > >>running with Book3S HV KVM on PowerPC 970, the RMA must be especially > >>allocated to be (host) physically contiguous. In this case, the RMA size > >>is determined by what the host admin allocated at boot time, and will > >>usually be less than the whole guest RAM size. > >> > >>This patch corrects the test to see if SLOF has enough memory for this > >>case. > >[...] > >>@@ -562,9 +562,9 @@ static void ppc_spapr_init(ram_addr_t ram_size, > >> > >> spapr->entry_point = KERNEL_LOAD_ADDR; > >> } else { > >>- if (ram_size< (MIN_RAM_SLOF<< 20)) { > >>+ if (rma_size< (MIN_RMA_SLOF<< 20)) { > >> fprintf(stderr, "qemu: pSeries SLOF firmware requires>= " > >>- "%ldM guest RAM\n", MIN_RAM_SLOF); > >>+ "%ldM guest RAM\n", MIN_RMA_SLOF); > >Maybe it's more helpful for the unexperienced users when we change the > >term "guest RAM" to "real mode area (RMA) memory" here? What do you > >think? > > Yes, please. That's basically what the patch is changing, so the > printf should be changed as well :). If you find it too confusing, > you can say "%ldM guest RAM (RMA)". Whoever uses KVM on a 970 will > have to manually allocate RMA regions in the first place, so he will > know what it means. Everyone else will read RAM (which should be > correct for p7 KVM and TCG). Duh, yeah, oversight. New version coming. -- 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