]> asedeno.scripts.mit.edu Git - linux.git/commit
KVM: PPC: Book3S HV: Add infrastructure for running HPT guests on radix host
authorPaul Mackerras <paulus@ozlabs.org>
Wed, 13 Sep 2017 06:00:10 +0000 (16:00 +1000)
committerPaul Mackerras <paulus@ozlabs.org>
Wed, 1 Nov 2017 04:36:28 +0000 (15:36 +1100)
commit18c3640cefc7f1c6986b7be48f5013a8d5e394cb
treecff16673ae102ed558ac278b9fa9f80cfdac3494
parente641a317830b6bd26e6dc2ef5fe2c1c181dd5cc2
KVM: PPC: Book3S HV: Add infrastructure for running HPT guests on radix host

This sets up the machinery for switching a guest between HPT (hashed
page table) and radix MMU modes, so that in future we can run a HPT
guest on a radix host on POWER9 machines.

* The KVM_PPC_CONFIGURE_V3_MMU ioctl can now specify either HPT or
  radix mode, on a radix host.

* The KVM_CAP_PPC_MMU_HASH_V3 capability now returns 1 on POWER9
  with HV KVM on a radix host.

* The KVM_PPC_GET_SMMU_INFO returns information about the HPT MMU on a
  radix host.

* The KVM_PPC_ALLOCATE_HTAB ioctl on a radix host will switch the
  guest to HPT mode and allocate a HPT.

* For simplicity, we now allocate the rmap array for each memslot,
  even on a radix host, since it will be needed if the guest switches
  to HPT mode.

* Since we cannot yet run a HPT guest on a radix host, the KVM_RUN
  ioctl will return an EINVAL error in that case.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/include/asm/kvm_ppc.h
arch/powerpc/kvm/book3s_64_mmu_hv.c
arch/powerpc/kvm/book3s_64_mmu_radix.c
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/kvm/powerpc.c