]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Allow use of small pages to back Book3S HV guests
authorPaul Mackerras <paulus@samba.org>
Mon, 12 Dec 2011 12:31:41 +0000 (12:31 +0000)
committerAvi Kivity <avi@redhat.com>
Mon, 5 Mar 2012 12:52:37 +0000 (14:52 +0200)
commit5728ddeb21c3e20962f933f9caaa3d80167a5207
treea811ee19778715766e720646506311c8fc7d7bd0
parente819b30d58c8e2e0630a29cf6f80a4dd8cb4653a
KVM: PPC: Allow use of small pages to back Book3S HV guests

This relaxes the requirement that the guest memory be provided as
16MB huge pages, allowing it to be provided as normal memory, i.e.
in pages of PAGE_SIZE bytes (4k or 64k).  To allow this, we index
the kvm->arch.slot_phys[] arrays with a small page index, even if
huge pages are being used, and use the low-order 5 bits of each
entry to store the order of the enclosing page with respect to
normal pages, i.e. log_2(enclosing_page_size / PAGE_SIZE).

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/powerpc/include/asm/kvm_book3s_64.h
arch/powerpc/include/asm/kvm_host.h
arch/powerpc/include/asm/kvm_ppc.h
arch/powerpc/include/asm/reg.h
arch/powerpc/kvm/book3s_64_mmu_hv.c
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/kvm/book3s_hv_rm_mmu.c