linux-stable/arch/x86/kernel/cpu/vortex.c
Marcos Del Sol Vives 639475d434 x86/CPU: Add support for Vortex CPUs
DM&P devices were not being properly identified, which resulted in
unneeded Spectre/Meltdown mitigations being applied.

The manufacturer states that these devices execute always in-order and
don't support either speculative execution or branch prediction, so
they are not vulnerable to this class of attack. [1]

This is something I've personally tested by a simple timing analysis
on my Vortex86MX CPU, and can confirm it is true.

Add identification for some devices that lack the CPUID product name
call, so they appear properly on /proc/cpuinfo.

¹https://www.ssv-embedded.de/doks/infos/DMP_Ann_180108_Meltdown.pdf

 [ bp: Massage commit message. ]

Signed-off-by: Marcos Del Sol Vives <marcos@orca.pet>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20211017094408.1512158-1-marcos@orca.pet
2021-10-21 15:49:07 +02:00

39 lines
788 B
C

// SPDX-License-Identifier: GPL-2.0
#include <linux/kernel.h>
#include <asm/processor.h>
#include "cpu.h"
/*
* No special init required for Vortex processors.
*/
static const struct cpu_dev vortex_cpu_dev = {
.c_vendor = "Vortex",
.c_ident = { "Vortex86 SoC" },
.legacy_models = {
{
.family = 5,
.model_names = {
[2] = "Vortex86DX",
[8] = "Vortex86MX",
},
},
{
.family = 6,
.model_names = {
/*
* Both the Vortex86EX and the Vortex86EX2
* have the same family and model id.
*
* However, the -EX2 supports the product name
* CPUID call, so this name will only be used
* for the -EX, which does not.
*/
[0] = "Vortex86EX",
},
},
},
.c_x86_vendor = X86_VENDOR_VORTEX,
};
cpu_dev_register(vortex_cpu_dev);