diff options
author | Paul Mackerras <paulus@ozlabs.org> | 2017-01-30 21:21:44 +1100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-01-31 19:11:48 +1100 |
commit | 9e04ba69beec372ddf857c700ff922e95f50b0d0 (patch) | |
tree | a2e50cc6724c65cc1113382c0ac9dee6729c2113 /arch/powerpc/include/asm/kvm_book3s_64.h | |
parent | ef8c640cb9cc865a461827b698fcc55b0ecaa600 (diff) | |
download | linux-stable-9e04ba69beec372ddf857c700ff922e95f50b0d0.tar.gz linux-stable-9e04ba69beec372ddf857c700ff922e95f50b0d0.tar.bz2 linux-stable-9e04ba69beec372ddf857c700ff922e95f50b0d0.zip |
KVM: PPC: Book3S HV: Add basic infrastructure for radix guests
This adds a field in struct kvm_arch and an inline helper to
indicate whether a guest is a radix guest or not, plus a new file
to contain the radix MMU code, which currently contains just a
translate function which knows how to traverse the guest page
tables to translate an address.
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/kvm_book3s_64.h')
-rw-r--r-- | arch/powerpc/include/asm/kvm_book3s_64.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/kvm_book3s_64.h b/arch/powerpc/include/asm/kvm_book3s_64.h index 848292176908..0db010cc4e65 100644 --- a/arch/powerpc/include/asm/kvm_book3s_64.h +++ b/arch/powerpc/include/asm/kvm_book3s_64.h @@ -36,6 +36,12 @@ static inline void svcpu_put(struct kvmppc_book3s_shadow_vcpu *svcpu) #endif #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE + +static inline bool kvm_is_radix(struct kvm *kvm) +{ + return kvm->arch.radix; +} + #define KVM_DEFAULT_HPT_ORDER 24 /* 16MB HPT by default */ #endif |