x86/microcode/intel: Expose collect_cpu_info_early() for IFS
authorJithu Joseph <jithu.joseph@intel.com>
Fri, 6 May 2022 22:53:59 +0000 (15:53 -0700)
committerHans de Goede <hdegoede@redhat.com>
Thu, 12 May 2022 13:35:29 +0000 (15:35 +0200)
commitd3287fb0d3c8afdfd4870a6cd4a852abc9008b3b
tree473713fa942687c2d2126f0b1035f59e5509b559
parent33e21e56243eb56d06530b07bcadc24ad02001f1
x86/microcode/intel: Expose collect_cpu_info_early() for IFS

IFS is a CPU feature that allows a binary blob, similar to microcode,
to be loaded and consumed to perform low level validation of CPU
circuitry. In fact, it carries the same Processor Signature
(family/model/stepping) details that are contained in Intel microcode
blobs.

In support of an IFS driver to trigger loading, validation, and running
of these tests blobs, make the functionality of cpu_signatures_match()
and collect_cpu_info_early() available outside of the microcode driver.

Add an "intel_" prefix and drop the "_early" suffix from
collect_cpu_info_early() and EXPORT_SYMBOL_GPL() it. Add
declaration to x86 <asm/cpu.h>

Make cpu_signatures_match() an inline function in x86 <asm/cpu.h>,
and also give it an "intel_" prefix.

No functional change intended.

Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
Co-developed-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20220506225410.1652287-2-tony.luck@intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
arch/x86/include/asm/cpu.h
arch/x86/kernel/cpu/intel.c
arch/x86/kernel/cpu/microcode/intel.c