]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S PR: Allow KVM_PPC_CONFIGURE_V3_MMU to succeed
authorPaul Mackerras <paulus@ozlabs.org>
Wed, 30 May 2018 05:47:17 +0000 (15:47 +1000)
committerPaul Mackerras <paulus@ozlabs.org>
Wed, 30 May 2018 23:21:50 +0000 (09:21 +1000)
commit3fefd7308c5dfaf3a51114638d49ad77e31693ce
treeab9c621371d9e6e98302c5ce40aec7fe039cb1a4
parent55022667e5f27fa2c896f7c4f3571ac0d79909d7
KVM: PPC: Book3S PR: Allow KVM_PPC_CONFIGURE_V3_MMU to succeed

Currently, PR KVM does not implement the configure_mmu operation, and
so the KVM_PPC_CONFIGURE_V3_MMU ioctl always fails with an EINVAL
error.  This causes recent kernels to fail to boot as a PR KVM guest
on POWER9, since recent kernels booted in HPT mode do the
H_REGISTER_PROC_TBL hypercall, which causes userspace (QEMU) to do
KVM_PPC_CONFIGURE_V3_MMU, which fails.

This implements a minimal configure_mmu operation for PR KVM.  It
succeeds only if the MMU is being configured for HPT mode and no
process table is being registered.  This is enough to get recent
kernels to boot as a PR KVM guest.

Reviewed-by: Greg Kurz <groug@kaod.org>
Tested-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/book3s_pr.c