summaryrefslogtreecommitdiff
path: root/arch/powerpc/include
diff options
context:
space:
mode:
authorFabiano Rosas <farosas@linux.ibm.com>2021-02-05 19:41:54 +0300
committerPaul Mackerras <paulus@ozlabs.org>2021-02-10 08:19:36 +0300
commita722076e947023a0d6ffca79661324c45ff30641 (patch)
tree0df849c59b97c425c77afa2fdc45d8bbd6d2af59 /arch/powerpc/include
parent25edcc50d76c834479d11fcc7de46f3da4d95121 (diff)
downloadlinux-a722076e947023a0d6ffca79661324c45ff30641.tar.xz
KVM: PPC: Don't always report hash MMU capability for P9 < DD2.2
These machines don't support running both MMU types at the same time, so remove the KVM_CAP_PPC_MMU_HASH_V3 capability when the host is using Radix MMU. [paulus@ozlabs.org - added defensive check on kvmppc_hv_ops->hash_v3_possible] Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r--arch/powerpc/include/asm/kvm_ppc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/kvm_ppc.h b/arch/powerpc/include/asm/kvm_ppc.h
index 13c39d24dda5..df4bda867bab 100644
--- a/arch/powerpc/include/asm/kvm_ppc.h
+++ b/arch/powerpc/include/asm/kvm_ppc.h
@@ -315,6 +315,7 @@ struct kvmppc_ops {
int (*enable_svm)(struct kvm *kvm);
int (*svm_off)(struct kvm *kvm);
int (*enable_dawr1)(struct kvm *kvm);
+ bool (*hash_v3_possible)(void);
};
extern struct kvmppc_ops *kvmppc_hv_ops;