]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
x86: Move gds_ucode_mitigated() declaration to header
authorArnd Bergmann <arnd@arndb.de>
Wed, 9 Aug 2023 13:05:00 +0000 (15:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Aug 2023 16:10:54 +0000 (18:10 +0200)
commit eb3515dc99c7c85f4170b50838136b2a193f8012 upstream.

The declaration got placed in the .c file of the caller, but that
causes a warning for the definition:

arch/x86/kernel/cpu/bugs.c:682:6: error: no previous prototype for 'gds_ucode_mitigated' [-Werror=missing-prototypes]

Move it to a header where both sides can observe it instead.

Fixes: 81ac7e5d74174 ("KVM: Add GDS_NO support to KVM")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Tested-by: Daniel Sneddon <daniel.sneddon@linux.intel.com>
Cc: stable@kernel.org
Link: https://lore.kernel.org/all/20230809130530.1913368-2-arnd%40kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/include/asm/processor.h
arch/x86/kvm/x86.c

index be441d520d63676ec61200418395b9c858f657d7..80af2ca9816e11320d4aaaf54c197de147c75a7c 100644 (file)
@@ -992,4 +992,6 @@ enum taa_mitigations {
        TAA_MITIGATION_TSX_DISABLED,
 };
 
+extern bool gds_ucode_mitigated(void);
+
 #endif /* _ASM_X86_PROCESSOR_H */
index 0661f1950a48093c4f6342ec244b825fa76cfaf9..33102596923c48573d2fc64f4c1323210bc59582 100644 (file)
@@ -201,8 +201,6 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {
 
 u64 __read_mostly host_xcr0;
 
-extern bool gds_ucode_mitigated(void);
-
 static int emulator_fix_hypercall(struct x86_emulate_ctxt *ctxt);
 
 static inline void kvm_async_pf_hash_reset(struct kvm_vcpu *vcpu)