From: Alexander Graf <agraf@suse.de>
To: QEMU-devel Developers <qemu-devel@nongnu.org>
Cc: Scott Wood <scottwood@freescale.com>
Subject: [Qemu-devel] [PATCH] kvm: ppc: warn user on PAGE_SIZE mismatch
Date: Tue, 3 May 2011 13:54:46 +0200 [thread overview]
Message-ID: <1304423686-18909-2-git-send-email-agraf@suse.de> (raw)
In-Reply-To: <1304423686-18909-1-git-send-email-agraf@suse.de>
On PPC, the default PAGE_SIZE is 64kb. Unfortunately, the hardware
alignments don't match here: There are RAM and MMIO regions within
a single page when it's 64kb in size.
So the only way out for now is to tell the user that he should use 4k
PAGE_SIZE.
This patch gives the user a hint on that, telling him that failing to
register a prefix slot is most likely to be caused by mismatching PAGE_SIZE.
This way it's also more future-proof, as bigger PAGE_SIZE can easily be
supported by other machines then, as long as they stick to 64kb granularities.
Signed-off-by: Alexander Graf <agraf@suse.de>
---
kvm-all.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/kvm-all.c b/kvm-all.c
index d92c20e..a30865e 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -590,6 +590,11 @@ static void kvm_set_phys_mem(target_phys_addr_t start_addr, ram_addr_t size,
if (err) {
fprintf(stderr, "%s: error registering prefix slot: %s\n",
__func__, strerror(-err));
+#ifdef TARGET_PPC
+ fprintf(stderr, "%s: This is probably because your kernel's " \
+ "PAGE_SIZE is too big. Please try to use 4k " \
+ "PAGE_SIZE!\n", __func__);
+#endif
abort();
}
}
--
1.6.0.2
next prev parent reply other threads:[~2011-05-03 11:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-03 11:54 [Qemu-devel] [PATCH] kvm: ppc: detect old headers Alexander Graf
2011-05-03 11:54 ` Alexander Graf [this message]
2011-05-03 12:14 ` Jan Kiszka
2011-05-03 12:28 ` Alexander Graf
2011-05-03 12:31 ` Jan Kiszka
2011-05-03 12:33 ` Alexander Graf
2011-05-03 12:33 ` [Qemu-devel] " Alexander Graf
2011-05-03 13:02 ` Jan Kiszka
2011-05-03 13:02 ` [Qemu-devel] " Jan Kiszka
-- strict thread matches above, loose matches on Subject: below --
2011-04-17 8:50 [Qemu-devel] [PATCH] kvm: ppc: warn user on PAGE_SIZE mismatch Alexander Graf
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=1304423686-18909-2-git-send-email-agraf@suse.de \
--to=agraf@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=scottwood@freescale.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.