From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: Blue Swirl <blauwirbel@gmail.com>, patches@linaro.org
Subject: [Qemu-devel] [PATCH v2 0/5] Let boards state maximum RAM limits in QEMUMachine struct
Date: Mon, 28 Mar 2011 14:44:17 +0100 [thread overview]
Message-ID: <1301319862-22998-1-git-send-email-peter.maydell@linaro.org> (raw)
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.)
If no maximum size is specified we default to the old behaviour of
"do not impose any limit".
The advantage of doing this in vl.c rather than in each board (apart
from avoiding code duplication) is that we can distinguish between
"the user asked for more RAM than we support" (an error) and "the global
default RAM size is more than our maximum" (just cap the RAM size to
the board maximum).
Changes in v2:
* use target_physaddr_t rather than ram_addr_t for max_ram, so
we can specify maximum ram sizes for 64 bit target boards
* new patches 3,4 which update sun4m to use the generic max_ram, so
we can delete the sun4m-specific code which was doing the same job
* patch 5 does some tidy-up of sun4m init functions; not strictly
related but the assert() at least is enabled by the cleanup done
in patch 3.
The number of changed lines in sun4m.c is a bit alarming but it's
almost all just moving code around...
Peter Maydell (5):
Allow boards to specify maximum RAM size
hw: Add maximum RAM specifications for ARM devboard models
hw/sun4m: Move QEMUMachine structs into sun4*_hwdef structs
hw/sun4m: Use the QEMUMachine max_ram to implement memory limit
hw/sun4m: Use a macro to hide the repetitive board init functions
hw/boards.h | 1 +
hw/integratorcp.c | 1 +
hw/realview.c | 11 +
hw/sun4m.c | 586 ++++++++++++++++++++++-------------------------------
hw/versatilepb.c | 5 +
vl.c | 16 ++-
6 files changed, 273 insertions(+), 347 deletions(-)
next reply other threads:[~2011-03-28 13:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-28 13:44 Peter Maydell [this message]
2011-03-28 13:44 ` [Qemu-devel] [PATCH v2 1/5] Allow boards to specify maximum RAM size Peter Maydell
2011-03-28 13:44 ` [Qemu-devel] [PATCH v2 2/5] hw: Add maximum RAM specifications for ARM devboard models Peter Maydell
2011-03-28 13:44 ` [Qemu-devel] [PATCH v2 3/5] hw/sun4m: Move QEMUMachine structs into sun4*_hwdef structs Peter Maydell
2011-03-28 17:31 ` [Qemu-devel] " Blue Swirl
2011-03-28 17:36 ` Peter Maydell
2011-03-28 17:58 ` Blue Swirl
2011-03-28 18:05 ` Peter Maydell
2011-03-28 13:44 ` [Qemu-devel] [PATCH v2 4/5] hw/sun4m: Use the QEMUMachine max_ram to implement memory limit Peter Maydell
2011-03-28 13:44 ` [Qemu-devel] [PATCH v2 5/5] hw/sun4m: Use a macro to hide the repetitive board init functions Peter Maydell
2011-03-28 17:32 ` [Qemu-devel] Re: [PATCH v2 0/5] Let boards state maximum RAM limits in QEMUMachine struct Blue Swirl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1301319862-22998-1-git-send-email-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=blauwirbel@gmail.com \
--cc=patches@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).