qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] kvm: ppc: warn user on PAGE_SIZE mismatch
@ 2011-04-17  8:50 Alexander Graf
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander Graf @ 2011-04-17  8:50 UTC (permalink / raw)
  To: qemu-devel

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 1d7e8ea..ff30858 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -577,6 +577,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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Qemu-devel] [PATCH] kvm: ppc: warn user on PAGE_SIZE mismatch
  2011-05-03 11:54 [Qemu-devel] [PATCH] kvm: ppc: detect old headers Alexander Graf
@ 2011-05-03 11:54 ` Alexander Graf
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander Graf @ 2011-05-03 11:54 UTC (permalink / raw)
  To: QEMU-devel Developers; +Cc: Scott Wood

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-03 11:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-17  8:50 [Qemu-devel] [PATCH] kvm: ppc: warn user on PAGE_SIZE mismatch Alexander Graf
  -- strict thread matches above, loose matches on Subject: below --
2011-05-03 11:54 [Qemu-devel] [PATCH] kvm: ppc: detect old headers Alexander Graf
2011-05-03 11:54 ` [Qemu-devel] [PATCH] kvm: ppc: warn user on PAGE_SIZE mismatch Alexander Graf

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).