summaryrefslogtreecommitdiff
path: root/sys/arch/amd64
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-02-25 23:41:25 -0500
committerIan Moffett <ian@osmora.org>2024-02-25 23:41:25 -0500
commitc9b48569f0aee7cbd643201d7eaf922ed1b7e8dc (patch)
tree88b5f791c03c5d86749dd7cc3bfbb788459806c7 /sys/arch/amd64
parent6262c51459bd48897e7a41094efa319edb2efb58 (diff)
kernel/amd64: spectre: Refactor
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r--sys/arch/amd64/amd64/spectre.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/arch/amd64/amd64/spectre.c b/sys/arch/amd64/amd64/spectre.c
index b276bba..1247607 100644
--- a/sys/arch/amd64/amd64/spectre.c
+++ b/sys/arch/amd64/amd64/spectre.c
@@ -69,9 +69,11 @@ try_spectre_mitigate(void)
}
KINFO("IBRS supported; spectre mitigation enabled\n");
+
tmp = rdmsr(IA32_SPEC_CTL);
tmp |= __BIT(0); /* IBRS */
wrmsr(IA32_SPEC_CTL, tmp);
+
return EXIT_SUCCESS;
}