summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/powerpc.c
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2012-08-07 10:24:14 +0200
committerAlexander Graf <agraf@suse.de>2012-10-05 23:38:39 +0200
commitf4800b1f4d23156e9080a08d6114e5d8bb767964 (patch)
treeccbd6d3e9966a86cbd7b5c71daa3b28bfb0edb12 /arch/powerpc/kvm/powerpc.c
parent97c95059848358f1577f471ec47cf68690f996e4 (diff)
downloadop-kernel-dev-f4800b1f4d23156e9080a08d6114e5d8bb767964.zip
op-kernel-dev-f4800b1f4d23156e9080a08d6114e5d8bb767964.tar.gz
KVM: PPC: Expose SYNC cap based on mmu notifiers
Semantically, the "SYNC" cap means that we have mmu notifiers available. Express this in our #ifdef'ery around the feature, so that we can be sure we don't miss out on ppc targets when they get their implementation. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm/powerpc.c')
-rw-r--r--arch/powerpc/kvm/powerpc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index dbf56e1..45fe433 100644
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -264,10 +264,16 @@ int kvm_dev_ioctl_check_extension(long ext)
if (cpu_has_feature(CPU_FTR_ARCH_201))
r = 2;
break;
+#endif
case KVM_CAP_SYNC_MMU:
+#ifdef CONFIG_KVM_BOOK3S_64_HV
r = cpu_has_feature(CPU_FTR_ARCH_206) ? 1 : 0;
- break;
+#elif defined(KVM_ARCH_WANT_MMU_NOTIFIER)
+ r = 1;
+#else
+ r = 0;
#endif
+ break;
case KVM_CAP_NR_VCPUS:
/*
* Recommending a number of CPUs is somewhat arbitrary; we
OpenPOWER on IntegriCloud