The branch stable/13 has been updated by markj:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=7f39284c271b6c5801b6af9a9f0e46805528b244

commit 7f39284c271b6c5801b6af9a9f0e46805528b244
Author:     Mark Johnston <[email protected]>
AuthorDate: 2021-07-29 14:14:05 +0000
Commit:     Mark Johnston <[email protected]>
CommitDate: 2021-08-12 13:43:31 +0000

    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
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit e1537450838134daaf584d1f17e661673b2c4c76)
---
 sys/amd64/amd64/mp_machdep.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
index 41c082ff40e9..d1064262891f 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -337,8 +337,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);
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to