Commit 7a9767dc authored by Juerg Haefliger's avatar Juerg Haefliger Committed by Stefan Bader

Revert "UBUNTU: SAUCE: rfi-flush: Allow HV to advertise multiple flush types"

This reverts commit 5dcadca3.

CVE-2017-5754

BugLink: http://bugs.launchpad.net/bugs/1756121

The functionality of this commit is provided by the following upstream
patch series:
  * powerpc/64s: Allow control of RFI flush via debugfs
  * powerpc/64s: Wire up cpu_show_meltdown()
  * powerpc/powernv: Check device-tree for RFI flush settings
  * powerpc/pseries: Query hypervisor for RFI flush settings
  * powerpc/64s: Support disabling RFI flush with no_rfi_flush and nopti
  * powerpc/64s: Add support for RFI flush of L1-D cache
  * powerpc/64s: Convert slb_miss_common to use RFI_TO_USER/KERNEL
  * powerpc/64: Convert the syscall exit path to use RFI_TO_USER/KERNEL
  * powerpc/64: Convert fast_exception_return to use RFI_TO_USER/KERNEL
  * powerpc/64s: Simple RFI macro conversions
  * powerpc/64: Add macros for annotating the destination of rfid/hrfid
  * powerpc/pseries: Add H_GET_CPU_CHARACTERISTICS flags & wrapper
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
parent c59dd7d6
...@@ -502,27 +502,27 @@ static void __init find_and_init_phbs(void) ...@@ -502,27 +502,27 @@ static void __init find_and_init_phbs(void)
static void pSeries_setup_rfi_flush(void) static void pSeries_setup_rfi_flush(void)
{ {
unsigned long character, behaviour, rc; unsigned long character, behaviour, rc;
enum l1d_flush_type types; enum l1d_flush_type type;
bool enable; bool enable;
/* Default to fallback in case hcall is not available */ /* Default to fallback in case hcall is not available */
types = L1D_FLUSH_FALLBACK; type = L1D_FLUSH_FALLBACK;
enable = true; enable = true;
rc = plpar_get_cpu_characteristics(&character, &behaviour); rc = plpar_get_cpu_characteristics(&character, &behaviour);
if (rc == H_SUCCESS) { if (rc == H_SUCCESS) {
/* Default to no flush, unless firmware says otherwise */ /* Default to no flush, unless firmware says otherwise */
types = L1D_FLUSH_NONE; type = L1D_FLUSH_NONE;
if (character & H_GET_CPU_CHAR_CHAR_MTTRIG2_L1_FLUSH) if (character & H_GET_CPU_CHAR_CHAR_MTTRIG2_L1_FLUSH)
types |= L1D_FLUSH_MTTRIG; type = L1D_FLUSH_MTTRIG;
if (character & H_GET_CPU_CHAR_CHAR_ORI30_L1_FLUSH) if (character & H_GET_CPU_CHAR_CHAR_ORI30_L1_FLUSH)
types |= L1D_FLUSH_ORI; type = L1D_FLUSH_ORI;
if (!(behaviour & H_GET_CPU_CHAR_BEHAV_L1_FLUSH_LOW_PRIV)) if (!(behaviour & H_GET_CPU_CHAR_BEHAV_L1_FLUSH_LOW_PRIV))
enable = false; enable = false;
} }
setup_rfi_flush(types, enable); setup_rfi_flush(type, enable);
} }
static void __init pSeries_setup_arch(void) static void __init pSeries_setup_arch(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment