From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=48799 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q1mBJ-0006dN-JB for qemu-devel@nongnu.org; Mon, 21 Mar 2011 16:58:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q1mBI-0007bg-Nv for qemu-devel@nongnu.org; Mon, 21 Mar 2011 16:58:29 -0400 Received: from ipmail05.adl6.internode.on.net ([150.101.137.143]:26167) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q1mBI-0007Wx-DX for qemu-devel@nongnu.org; Mon, 21 Mar 2011 16:58:28 -0400 From: Brad Hards Subject: Re: [Qemu-devel] [PATCH 0/2] Let boards state maximum RAM limits in QEMUMachine struct Date: Tue, 22 Mar 2011 07:44:19 +1100 References: <1300729640-6410-1-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1300729640-6410-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201103220744.20014.bradh@frogmouth.net> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Tue, 22 Mar 2011 04:47:18 am Peter Maydell wrote: > This fairly simple patchset adds a new 'max_ram' field to the QEMUMachine > structure so that a board model can specify the maximum RAM it will accept. > We can then produce a friendly diagnostic message when the user tries to > start qemu with a '-m' option asking for more RAM than that. (Currently > most of the ARM devboard models respond with an obscure guest crash when > the guest tries to access RAM and finds device registers instead.) As a user, I've been bitten by this. Without understanding how qemu works, the problem is quite surprising: "all I've done is increased the RAM, and now it just crashes". I don't think my review of the code will count for much, and I'd prefer to see the code added rather than not, but you could move the cmd.c macros (MEGABYTES and TO_MEGABYTES) to some common header and just use those. They are pretty ugly though... Brad