diff options
author | Suraj Jitindar Singh <sjitindarsingh@gmail.com> | 2018-12-14 16:29:04 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@ozlabs.org> | 2018-12-17 11:33:49 +1100 |
commit | d232afebf97168487e83d1366e41d53609cd1f55 (patch) | |
tree | 39ce4881c82c112e1b240d2601f0e3ff1ecfb9e0 /arch/powerpc/kvm | |
parent | 693ac10a88a2219bde553b2e8460dbec97e594e6 (diff) |
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>
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r-- | arch/powerpc/kvm/book3s_hv_nested.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_hv_nested.c b/arch/powerpc/kvm/book3s_hv_nested.c index 6d1b14bd7e65..6f9e1ad60527 100644 --- a/arch/powerpc/kvm/book3s_hv_nested.c +++ b/arch/powerpc/kvm/book3s_hv_nested.c @@ -480,6 +480,7 @@ struct kvm_nested_guest *kvmhv_alloc_nested(struct kvm *kvm, unsigned int lpid) if (shadow_lpid < 0) goto out_free2; gp->shadow_lpid = shadow_lpid; + gp->radix = 1; memset(gp->prev_cpu, -1, sizeof(gp->prev_cpu)); |