KVM: PPC: Book3S HV: Allow HV module to load without hypervisor mode
authorPaul Mackerras <paulus@ozlabs.org>
Mon, 8 Oct 2018 05:31:16 +0000 (16:31 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 9 Oct 2018 05:04:27 +0000 (16:04 +1100)
commitde760db4d9d7b3e735dbc7e4e3fa2c00909abe7c
treeef875be9a4c9ff0d5676a1b094e34183658cc424
parent10b5022db7861a98f3d9a87eed8405f2d4e37ed6
KVM: PPC: Book3S HV: Allow HV module to load without hypervisor mode

With this, the KVM-HV module can be loaded in a guest running under
KVM-HV, and if the hypervisor supports nested virtualization, this
guest can now act as a nested hypervisor and run nested guests.

This also adds some checks to inform userspace that HPT guests are not
supported by nested hypervisors (by returning false for the
KVM_CAP_PPC_MMU_HASH_V3 capability), and to prevent userspace from
configuring a guest to use HPT mode.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/kvm/powerpc.c