amd64: Set MSR_KGSBASE to 0 during AP startup

There is no reason to initialize it to anything else, and this matches
initialization of the BSP.  No functional change intended.

Reviewed by:	kib
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D31336
This commit is contained in:
Mark Johnston
2021-07-29 10:14:05 -04:00
parent 9e575fadf4
commit e153745083
+2 -2
View File
@@ -262,8 +262,8 @@ init_secondary(void)
lgdt(&ap_gdt); /* does magic intra-segment return */
wrmsr(MSR_FSBASE, 0); /* User value */
wrmsr(MSR_GSBASE, (u_int64_t)pc);
wrmsr(MSR_KGSBASE, (u_int64_t)pc); /* XXX User value while we're in the kernel */
wrmsr(MSR_GSBASE, (uint64_t)pc);
wrmsr(MSR_KGSBASE, 0); /* User value */
fix_cpuid();
lidt(&r_idt);