Blob Blame History Raw
From: Borislav Petkov <bp@suse.de>
Date: Fri Dec 21 14:30:29 CET 2018
Subject: x86/kabi: Fix cpu_tlbstate issue
References: bsc#1106913
Patch-mainline: never, kabi

Fix this:

  ./patches/rpm/kabi.pl --rules patches/kabi/severities patches/kabi/x86_64/sym vers-default Module.symvers
  KABI: symbol cpu_tlbstate(vmlinux) changed crc from 0x19cc18df to 0xa9f776ad
  KABI: symbol xen_xlate_map_ballooned_pages(vmlinux) changed crc from 0xfdc88b7f to 0x5466f030
  KABI: aborting due to kabi changes.

[js] changed by commit 4c71a2b6fd7e42814aa68a6dec88abf3b42ea573.

Signed-off-by: Borislav Petkov <bp@suse.de>

---
 arch/x86/include/asm/tlbflush.h |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

--- a/arch/x86/include/asm/tlbflush.h
+++ b/arch/x86/include/asm/tlbflush.h
@@ -184,14 +184,19 @@ struct tlb_state {
 
 #define LOADED_MM_SWITCHING ((struct mm_struct *)1)
 
+	u16 loaded_mm_asid;
+	u16 next_asid;
+
+#ifndef __GENKSYMS__
 	/* Last user mm for optimizing IBPB */
 	union {
 		struct mm_struct	*last_user_mm;
 		unsigned long		last_user_mm_ibpb;
 	};
-
-	u16 loaded_mm_asid;
-	u16 next_asid;
+#else
+	/* last user mm's ctx id */
+	u64 last_ctx_id;
+#endif
 
 	/*
 	 * We can be in one of several states:
@@ -254,6 +259,7 @@ struct tlb_state {
 	 * context 0.
 	 */
 	struct tlb_context ctxs[TLB_NR_DYN_ASIDS];
+
 };
 DECLARE_PER_CPU_SHARED_ALIGNED(struct tlb_state, cpu_tlbstate);