From: Wen Yang <simon.wy@xxxxxxxxxxxxxxx> commit ddd07b750382adc2b78fdfbec47af8a6e0d8ef37 upstream. CAT has happened, WBINDV is bad (even before CAT blowing away the entire cache on a multi-core platform wasn't nice), try not to use it ever. Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Reviewed-by: Dave Hansen <dave.hansen@xxxxxxxxx> Cc: Bin Yang <bin.yang@xxxxxxxxx> Cc: Mark Gross <mark.gross@xxxxxxxxx> Link: https://lkml.kernel.org/r/20180919085947.933674526@xxxxxxxxxxxxx Cc: <stable@xxxxxxxxxxxxxxx> # 4.9.x: d2479a3: x86/pti: Fix boot problems from Global-bit setting Cc: <stable@xxxxxxxxxxxxxxx> # 4.9.x Signed-off-by: Wen Yang <wenyang@xxxxxxxxxxxxxxxxx> --- arch/x86/mm/pageattr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index a586faeab0e5..e1b5b603eb48 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c @@ -215,13 +215,12 @@ static void cpa_flush_array(unsigned long *start, int numpages, int cache, int in_flags, struct page **pages) { unsigned int i, level; - unsigned long do_wbinvd = cache && numpages >= 1024; /* 4M threshold */ BUG_ON(irqs_disabled() && !early_boot_irqs_disabled); - on_each_cpu(__cpa_flush_all, (void *) do_wbinvd, 1); + flush_tlb_all(); - if (!cache || do_wbinvd) + if (!cache) return; /* -- 2.19.1.6.gb485710b