powerpc/pseries: Support firmware disable of RFI flush
authorMichael Ellerman <mpe@ellerman.id.au>
Thu, 22 Feb 2018 12:58:49 +0000 (23:58 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 23 Feb 2018 05:55:40 +0000 (16:55 +1100)
Some versions of firmware will have a setting that can be configured
to disable the RFI flush, add support for it.

Fixes: 8989d56878a7 ("powerpc/pseries: Query hypervisor for RFI flush settings")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/pseries/setup.c

index 372d7ad..1a52762 100644 (file)
@@ -482,7 +482,8 @@ static void pseries_setup_rfi_flush(void)
                if (types == L1D_FLUSH_NONE)
                        types = L1D_FLUSH_FALLBACK;
 
-               if (!(result.behaviour & H_CPU_BEHAV_L1D_FLUSH_PR))
+               if ((!(result.behaviour & H_CPU_BEHAV_L1D_FLUSH_PR)) ||
+                   (!(result.behaviour & H_CPU_BEHAV_FAVOUR_SECURITY)))
                        enable = false;
        } else {
                /* Default to fallback if case hcall is not available */