summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/tlb.h
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2017-11-13 10:24:50 +0100
committerJuergen Gross <jgross@suse.com>2017-11-13 10:24:50 +0100
commit3a485c2be49dde899e506684bb5f06d5b3f73e82 (patch)
treee013f4d121199d60b70043f525aef4a7e641b5f6 /arch/x86/include/asm/tlb.h
parent569dbb88e80deb68974ef6fdd6a13edb9d686261 (diff)
parentbebc6082da0a9f5d47a1ea2edc099bf671058bd4 (diff)
downloadlinux-3a485c2be49dde899e506684bb5f06d5b3f73e82.tar.bz2
Merge tag 'v4.14' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
Linux 4.14
Diffstat (limited to 'arch/x86/include/asm/tlb.h')
-rw-r--r--arch/x86/include/asm/tlb.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/x86/include/asm/tlb.h b/arch/x86/include/asm/tlb.h
index c7797307fc2b..cb0a1f470980 100644
--- a/arch/x86/include/asm/tlb.h
+++ b/arch/x86/include/asm/tlb.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_X86_TLB_H
#define _ASM_X86_TLB_H
@@ -15,4 +16,18 @@
#include <asm-generic/tlb.h>
+/*
+ * While x86 architecture in general requires an IPI to perform TLB
+ * shootdown, enablement code for several hypervisors overrides
+ * .flush_tlb_others hook in pv_mmu_ops and implements it by issuing
+ * a hypercall. To keep software pagetable walkers safe in this case we
+ * switch to RCU based table free (HAVE_RCU_TABLE_FREE). See the comment
+ * below 'ifdef CONFIG_HAVE_RCU_TABLE_FREE' in include/asm-generic/tlb.h
+ * for more details.
+ */
+static inline void __tlb_remove_table(void *table)
+{
+ free_page_and_swap_cache(table);
+}
+
#endif /* _ASM_X86_TLB_H */