]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
KVM: PPC: Book3S: Make magic page properly 4k mappable
authorAlexander Graf <agraf@suse.de>
Sun, 13 Jul 2014 14:37:12 +0000 (16:37 +0200)
committerAlexander Graf <agraf@suse.de>
Mon, 28 Jul 2014 13:23:11 +0000 (15:23 +0200)
commit89b68c96a24f6520c8815f88254c8e7d09aeb40e
treeb44bca648e0a9d770f2eb4f25f62951118f201dc
parentc01e3f66cd5cdc1f727f4c7b0c10b3e3bdb91ba7
KVM: PPC: Book3S: Make magic page properly 4k mappable

The magic page is defined as a 4k page of per-vCPU data that is shared
between the guest and the host to accelerate accesses to privileged
registers.

However, when the host is using 64k page size granularity we weren't quite
as strict about that rule anymore. Instead, we partially treated all of the
upper 64k as magic page and mapped only the uppermost 4k with the actual
magic contents.

This works well enough for Linux which doesn't use any memory in kernel
space in the upper 64k, but Mac OS X got upset. So this patch makes magic
page actually stay in a 4k range even on 64k page size hosts.

This patch fixes magic page usage with Mac OS X (using MOL) on 64k PAGE_SIZE
hosts for me.

Signed-off-by: Alexander Graf <agraf@suse.de>
arch/powerpc/include/asm/kvm_book3s.h
arch/powerpc/kvm/book3s.c
arch/powerpc/kvm/book3s_32_mmu_host.c
arch/powerpc/kvm/book3s_64_mmu_host.c
arch/powerpc/kvm/book3s_pr.c
arch/powerpc/kvm/powerpc.c