From: Alexander Graf Date: Sat, 16 Apr 2011 08:15:11 +0000 (+0200) Subject: kvm: ppc: warn user on PAGE_SIZE mismatch X-Git-Tag: v0.15.0-rc0~285^2~9 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=d4d6868f7b18874d6371388e3c226ea235802215;p=qemu.git kvm: ppc: warn user on PAGE_SIZE mismatch 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 --- diff --git a/kvm-all.c b/kvm-all.c index 3b81b68b9..106eb3adb 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -603,6 +603,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(); } }