mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 11:33:36 -04:00
x86/cpu: Add cpu_type to struct x86_cpu_id
In addition to matching vendor/family/model/feature, for hybrid variants it is required to also match cpu-type. For example, some CPU vulnerabilities like RFDS only affect a specific cpu-type. To be able to also match CPUs based on their type, add a new field "type" to struct x86_cpu_id which is used by the CPU-matching tables. Introduce X86_CPU_TYPE_ANY for the cases that don't care about the cpu-type. [ bp: Massage commit message. ] Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Signed-off-by: Ingo Molnar <mingo@kernel.org> Acked-by: Dave Hansen <dave.hansen@linux.intel.com> Link: https://lore.kernel.org/r/20250311-add-cpu-type-v8-3-e8514dcaaff2@linux.intel.com
This commit is contained in:
@@ -692,6 +692,7 @@ struct x86_cpu_id {
|
||||
__u16 feature; /* bit index */
|
||||
/* Solely for kernel-internal use: DO NOT EXPORT to userspace! */
|
||||
__u16 flags;
|
||||
__u8 type;
|
||||
kernel_ulong_t driver_data;
|
||||
};
|
||||
|
||||
@@ -703,6 +704,7 @@ struct x86_cpu_id {
|
||||
#define X86_STEP_MIN 0
|
||||
#define X86_STEP_MAX 0xf
|
||||
#define X86_FEATURE_ANY 0 /* Same as FPU, you can't test for that */
|
||||
#define X86_CPU_TYPE_ANY 0
|
||||
|
||||
/*
|
||||
* Generic table type for matching CPU features.
|
||||
|
||||
Reference in New Issue
Block a user