29 lines
780 B
Diff
29 lines
780 B
Diff
From 13fac8226036456c15c517c1dd77be5109a61da2 Mon Sep 17 00:00:00 2001
|
|
From: Rik van Riel <riel@surriel.com>
|
|
Date: Mon, 30 Dec 2024 12:53:08 -0500
|
|
Subject: x86/tlb: use INVLPGB in flush_tlb_all
|
|
|
|
The flush_tlb_all() function is not used a whole lot, but we might
|
|
as well use broadcast TLB flushing there, too.
|
|
|
|
Signed-off-by: Rik van Riel <riel@surriel.com>
|
|
---
|
|
arch/x86/mm/tlb.c | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
--- a/arch/x86/mm/tlb.c
|
|
+++ b/arch/x86/mm/tlb.c
|
|
@@ -1045,6 +1045,12 @@ static void do_flush_tlb_all(void *info)
|
|
void flush_tlb_all(void)
|
|
{
|
|
count_vm_tlb_event(NR_TLB_REMOTE_FLUSH);
|
|
+ if (cpu_feature_enabled(X86_FEATURE_INVLPGB)) {
|
|
+ guard(preempt)();
|
|
+ invlpgb_flush_all();
|
|
+ tlbsync();
|
|
+ return;
|
|
+ }
|
|
on_each_cpu(do_flush_tlb_all, NULL, 1);
|
|
}
|
|
|