mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-28 04:17:47 +00:00
powerpc/rfi-flush: Always enable fallback flush on pseries
This ensures the fallback flush area is always allocated on pseries, so in case a LPAR is migrated from a patched to an unpatched system, it is possible to enable the fallback flush in the target system. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
abf110f3e1
commit
84749a58b6
@ -468,26 +468,18 @@ static void pseries_setup_rfi_flush(void)
|
|||||||
|
|
||||||
/* Enable by default */
|
/* Enable by default */
|
||||||
enable = true;
|
enable = true;
|
||||||
|
types = L1D_FLUSH_FALLBACK;
|
||||||
|
|
||||||
rc = plpar_get_cpu_characteristics(&result);
|
rc = plpar_get_cpu_characteristics(&result);
|
||||||
if (rc == H_SUCCESS) {
|
if (rc == H_SUCCESS) {
|
||||||
types = L1D_FLUSH_NONE;
|
|
||||||
|
|
||||||
if (result.character & H_CPU_CHAR_L1D_FLUSH_TRIG2)
|
if (result.character & H_CPU_CHAR_L1D_FLUSH_TRIG2)
|
||||||
types |= L1D_FLUSH_MTTRIG;
|
types |= L1D_FLUSH_MTTRIG;
|
||||||
if (result.character & H_CPU_CHAR_L1D_FLUSH_ORI30)
|
if (result.character & H_CPU_CHAR_L1D_FLUSH_ORI30)
|
||||||
types |= L1D_FLUSH_ORI;
|
types |= L1D_FLUSH_ORI;
|
||||||
|
|
||||||
/* Use fallback if nothing set in hcall */
|
|
||||||
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)))
|
(!(result.behaviour & H_CPU_BEHAV_FAVOUR_SECURITY)))
|
||||||
enable = false;
|
enable = false;
|
||||||
} else {
|
|
||||||
/* Default to fallback if case hcall is not available */
|
|
||||||
types = L1D_FLUSH_FALLBACK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_rfi_flush(types, enable);
|
setup_rfi_flush(types, enable);
|
||||||
|
Loading…
Reference in New Issue
Block a user