Received: from eggs.gnu.org ([140.186.70.92]:56349) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QBNgF-00027Z-Mg for qemu-devel@nongnu.org; Sun, 17 Apr 2011 04:50:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QBNgE-0000ix-SV for qemu-devel@nongnu.org; Sun, 17 Apr 2011 04:50:07 -0400 Received: from cantor.suse.de ([195.135.220.2]:39789 helo=mx1.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QBNgE-0000it-NL for qemu-devel@nongnu.org; Sun, 17 Apr 2011 04:50:06 -0400 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 0D3F0957DB for ; Sun, 17 Apr 2011 10:50:06 +0200 (CEST) From: Alexander Graf Date: Sun, 17 Apr 2011 10:50:01 +0200 Message-Id: <1303030201-4317-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PATCH] kvm: ppc: warn user on PAGE_SIZE mismatch List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 --- 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