powerpc/mm: Update tlbiel loop on POWER10
[sfrench/cifs-2.6.git] / arch / powerpc / kvm / book3s_hv.c
index e3b1839fc251931d65a69e602c64df8b13d70c27..0faafe6f8c4e72a57239a040386cfa5225a0599b 100644 (file)
@@ -4949,7 +4949,12 @@ static int kvmppc_core_init_vm_hv(struct kvm *kvm)
         * Work out how many sets the TLB has, for the use of
         * the TLB invalidation loop in book3s_hv_rmhandlers.S.
         */
-       if (radix_enabled())
+       if (cpu_has_feature(CPU_FTR_ARCH_31)) {
+               /*
+                * P10 will flush all the congruence class with a single tlbiel
+                */
+               kvm->arch.tlb_sets = 1;
+       } else if (radix_enabled())
                kvm->arch.tlb_sets = POWER9_TLB_SETS_RADIX;     /* 128 */
        else if (cpu_has_feature(CPU_FTR_ARCH_300))
                kvm->arch.tlb_sets = POWER9_TLB_SETS_HASH;      /* 256 */