summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/book3s_32_mmu.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2013-09-20 14:52:45 +1000
committerAlexander Graf <agraf@suse.de>2013-10-17 14:45:03 +0200
commitc9029c341da646ab0c9911ea4c118eaa0a2eb0fa (patch)
treeb2474961ed358c115d3dbd4dc9a29791b67e1a75 /arch/powerpc/kvm/book3s_32_mmu.c
parenta4a0f2524acc2c602cadd8e743be19d86f3a746b (diff)
downloadlinux-c9029c341da646ab0c9911ea4c118eaa0a2eb0fa.tar.gz
linux-c9029c341da646ab0c9911ea4c118eaa0a2eb0fa.tar.bz2
linux-c9029c341da646ab0c9911ea4c118eaa0a2eb0fa.zip
KVM: PPC: Book3S PR: Use 64k host pages where possible
Currently, PR KVM uses 4k pages for the host-side mappings of guest memory, regardless of the host page size. When the host page size is 64kB, we might as well use 64k host page mappings for guest mappings of 64kB and larger pages and for guest real-mode mappings. However, the magic page has to remain a 4k page. To implement this, we first add another flag bit to the guest VSID values we use, to indicate that this segment is one where host pages should be mapped using 64k pages. For segments with this bit set we set the bits in the shadow SLB entry to indicate a 64k base page size. When faulting in host HPTEs for this segment, we make them 64k HPTEs instead of 4k. We record the pagesize in struct hpte_cache for use when invalidating the HPTE. For now we restrict the segment containing the magic page (if any) to 4k pages. It should be possible to lift this restriction in future by ensuring that the magic 4k page is appropriately positioned within a host 64k page. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm/book3s_32_mmu.c')
-rw-r--r--arch/powerpc/kvm/book3s_32_mmu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_32_mmu.c b/arch/powerpc/kvm/book3s_32_mmu.c
index c8cefdd15fd8..af045533e685 100644
--- a/arch/powerpc/kvm/book3s_32_mmu.c
+++ b/arch/powerpc/kvm/book3s_32_mmu.c
@@ -308,6 +308,7 @@ static int kvmppc_mmu_book3s_32_xlate(struct kvm_vcpu *vcpu, gva_t eaddr,
ulong mp_ea = vcpu->arch.magic_page_ea;
pte->eaddr = eaddr;
+ pte->page_size = MMU_PAGE_4K;
/* Magic page override */
if (unlikely(mp_ea) &&