Commit 7418dcc2 authored by Michael Ellerman's avatar Michael Ellerman Committed by Juerg Haefliger

powerpc/rfi-flush: Call setup_rfi_flush() after LPM migration

CVE-2018-3639 (powerpc)

We might have migrated to a machine that uses a different flush type,
or doesn't need flushing at all.
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
(cherry picked from 921bc6cf)
[mauricio: backport: pseries.h: update context lines]
Signed-off-by: default avatarMauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
parent 42b25558
...@@ -314,6 +314,9 @@ void post_mobility_fixup(void) ...@@ -314,6 +314,9 @@ void post_mobility_fixup(void)
printk(KERN_ERR "Post-mobility device tree update " printk(KERN_ERR "Post-mobility device tree update "
"failed: %d\n", rc); "failed: %d\n", rc);
/* Possibly switch to a new RFI flush type */
pseries_setup_rfi_flush();
return; return;
} }
......
...@@ -81,4 +81,6 @@ extern struct pci_controller_ops pseries_pci_controller_ops; ...@@ -81,4 +81,6 @@ extern struct pci_controller_ops pseries_pci_controller_ops;
unsigned long pseries_memory_block_size(void); unsigned long pseries_memory_block_size(void);
void pseries_setup_rfi_flush(void);
#endif /* _PSERIES_PSERIES_H */ #endif /* _PSERIES_PSERIES_H */
...@@ -499,7 +499,7 @@ static void __init find_and_init_phbs(void) ...@@ -499,7 +499,7 @@ static void __init find_and_init_phbs(void)
of_pci_check_probe_only(); of_pci_check_probe_only();
} }
static void pseries_setup_rfi_flush(void) void pseries_setup_rfi_flush(void)
{ {
struct h_cpu_char_result result; struct h_cpu_char_result result;
enum l1d_flush_type types; enum l1d_flush_type types;
......
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