summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-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;
}