Skip to content

Commit 65efc4d

Browse files
KAGA-KOKOIngo Molnar
authored andcommitted
x86/cpu: Provide a declaration for itlb_multihit_kvm_mitigation
Sparse complains rightfully about the missing declaration which has been placed sloppily into the usage site: bugs.c:2223:6: sparse: warning: symbol 'itlb_multihit_kvm_mitigation' was not declared. Should it be static? Add it to <asm/spec-ctrl.h> where it belongs and remove the one in the KVM code. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20240304005104.787173239@linutronix.de
1 parent ca3ec9e commit 65efc4d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

arch/x86/include/asm/spec-ctrl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,6 @@ static inline void speculative_store_bypass_ht_init(void) { }
9696
extern void speculation_ctrl_update(unsigned long tif);
9797
extern void speculation_ctrl_update_current(void);
9898

99+
extern bool itlb_multihit_kvm_mitigation;
100+
99101
#endif

arch/x86/kvm/mmu/mmu.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,11 @@
5353
#include <asm/cmpxchg.h>
5454
#include <asm/io.h>
5555
#include <asm/set_memory.h>
56+
#include <asm/spec-ctrl.h>
5657
#include <asm/vmx.h>
5758

5859
#include "trace.h"
5960

60-
extern bool itlb_multihit_kvm_mitigation;
61-
6261
static bool nx_hugepage_mitigation_hard_disabled;
6362

6463
int __read_mostly nx_huge_pages = -1;

0 commit comments

Comments
 (0)