x86: Move gds_ucode_mitigated() declaration to header

commit eb3515dc99 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: 81ac7e5d74 ("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>
This commit is contained in:
Arnd Bergmann 2023-08-09 15:05:00 +02:00 committed by Justin Hammond
parent 3b1ad5fd72
commit f274f9dc79
2 changed files with 2 additions and 2 deletions

View file

@ -859,4 +859,6 @@ enum mds_mitigations {
MDS_MITIGATION_VMWERV,
};
extern bool gds_ucode_mitigated(void);
#endif /* _ASM_X86_PROCESSOR_H */

View file

@ -303,8 +303,6 @@ static struct kmem_cache *x86_fpu_cache;
static struct kmem_cache *x86_emulator_cache;
extern bool gds_ucode_mitigated(void);
/*
* When called, it means the previous get/set msr reached an invalid msr.
* Return true if we want to ignore/silent this failed msr access.