KVM: PPC: Book3S HV: Add function kvmhv_vcpu_is_radix()
authorSuraj Jitindar Singh <sjitindarsingh@gmail.com>
Fri, 14 Dec 2018 05:29:04 +0000 (16:29 +1100)
committerPaul Mackerras <paulus@ozlabs.org>
Mon, 17 Dec 2018 00:33:49 +0000 (11:33 +1100)
commitd232afebf97168487e83d1366e41d53609cd1f55
tree39ce4881c82c112e1b240d2601f0e3ff1ecfb9e0
parent693ac10a88a2219bde553b2e8460dbec97e594e6
KVM: PPC: Book3S HV: Add function kvmhv_vcpu_is_radix()

There exists a function kvm_is_radix() which is used to determine if a
kvm instance is using the radix mmu. However this only applies to the
first level (L1) guest. Add a function kvmhv_vcpu_is_radix() which can
be used to determine if the current execution context of the vcpu is
radix, accounting for if the vcpu is running a nested guest.

Currently all nested guests must be radix but this may change in the
future.

Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/include/asm/kvm_book3s_64.h
arch/powerpc/kvm/book3s_hv_nested.c