]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/cpu/vfm: Add/initialize x86_vfm field to struct cpuinfo_x86
authorTony Luck <tony.luck@intel.com>
Tue, 16 Apr 2024 21:19:03 +0000 (14:19 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Jan 2025 09:32:08 +0000 (10:32 +0100)
commitcb3491e875f60580cd984490fd6fec87170d0533
tree3c0fe615b127f40c30edb8f3b7036d4f9997ceb2
parentf3a3192993daa1ff0adcbfabbbf99aa9b4c5a350
x86/cpu/vfm: Add/initialize x86_vfm field to struct cpuinfo_x86

[ Upstream commit a9d0adce69075192961f3be466c4810a21b7bc9e ]

Refactor struct cpuinfo_x86 so that the vendor, family, and model
fields are overlaid in a union with a 32-bit field that combines
all three (together with a one byte reserved field in the upper
byte).

This will make it easy, cheap, and reliable to check all three
values at once.

See

  https://lore.kernel.org/r/Zgr6kT8oULbnmEXx@agluck-desk3

for why the ordering is (low-to-high bits):

  (vendor, family, model)

  [ bp: Move comments over the line, add the backstory about the
    particular order of the fields. ]

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240416211941.9369-2-tony.luck@intel.com
Stable-dep-of: c9a4b55431e5 ("x86/cpu: Add Lunar Lake to list of CPUs with a broken MONITOR implementation")
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/include/asm/processor.h