]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
KVM: PPC: Book3E: Enable e6500 core
authorMihai Caraman <mihai.caraman@freescale.com>
Mon, 1 Sep 2014 09:01:59 +0000 (12:01 +0300)
committerAlexander Graf <agraf@suse.de>
Mon, 22 Sep 2014 08:11:35 +0000 (10:11 +0200)
Now that AltiVec and hardware thread support is in place enable e6500 core.

Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
arch/powerpc/kvm/e500mc.c

index bf8f99f6676a30d1f49bf432bee5520d6e23ee40..2fdc8722e3241b23e29baf60bce057cfb7a85244 100644 (file)
@@ -180,6 +180,16 @@ int kvmppc_core_check_processor_compat(void)
                r = 0;
        else if (strcmp(cur_cpu_spec->cpu_name, "e5500") == 0)
                r = 0;
+#ifdef CONFIG_ALTIVEC
+       /*
+        * Since guests have the priviledge to enable AltiVec, we need AltiVec
+        * support in the host to save/restore their context.
+        * Don't use CPU_FTR_ALTIVEC to identify cores with AltiVec unit
+        * because it's cleared in the absence of CONFIG_ALTIVEC!
+        */
+       else if (strcmp(cur_cpu_spec->cpu_name, "e6500") == 0)
+               r = 0;
+#endif
        else
                r = -ENOTSUPP;