From c9b48569f0aee7cbd643201d7eaf922ed1b7e8dc Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sun, 25 Feb 2024 23:41:25 -0500 Subject: kernel/amd64: spectre: Refactor Signed-off-by: Ian Moffett --- sys/arch/amd64/amd64/spectre.c | 2 ++ 1 file changed, 2 insertions(+) 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; } -- cgit v1.2.3