-
Notifications
You must be signed in to change notification settings - Fork 52.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
f3f07ae
commit 639475d
Showing
5 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// 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); |