x86/mm/cpa: Fix cpa_flush_array() TLB invalidation
authorPeter Zijlstra <peterz@infradead.org>
Mon, 3 Dec 2018 17:03:44 +0000 (18:03 +0100)
committerIngo Molnar <mingo@kernel.org>
Mon, 17 Dec 2018 17:48:09 +0000 (18:48 +0100)
commit721066dfd4d5c0fee5772c777d6930d0f423b4eb
treec79ef0f4f26fbdf5696f8e2122fe7a99510ed057
parentcd01544a268ad8ee5b1dfe42c4393f1095f86879
x86/mm/cpa: Fix cpa_flush_array() TLB invalidation

In commit:

  a7295fd53c39 ("x86/mm/cpa: Use flush_tlb_kernel_range()")

I misread the CAP array code and incorrectly used
tlb_flush_kernel_range(), resulting in missing TLB flushes and
consequent failures.

Instead do a full invalidate in this case -- for now.

Reported-by: StDenis, Tom <Tom.StDenis@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@surriel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: dave.hansen@intel.com
Fixes: a7295fd53c39 ("x86/mm/cpa: Use flush_tlb_kernel_range()")
Link: http://lkml.kernel.org/r/20181203171043.089868285@infradead.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/mm/pageattr.c