From owner-dev-commits-src-all@freebsd.org Thu Aug 12 13:49:52 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C56D366C81C; Thu, 12 Aug 2021 13:49:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Glp344ry0z4n8f; Thu, 12 Aug 2021 13:49:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8BB2223B7D; Thu, 12 Aug 2021 13:49:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17CDnqIm052520; Thu, 12 Aug 2021 13:49:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17CDnq8U052519; Thu, 12 Aug 2021 13:49:52 GMT (envelope-from git) Date: Thu, 12 Aug 2021 13:49:52 GMT Message-Id: <202108121349.17CDnq8U052519@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 7f39284c271b - stable/13 - amd64: Set MSR_KGSBASE to 0 during AP startup MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7f39284c271b6c5801b6af9a9f0e46805528b244 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Aug 2021 13:49:52 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7f39284c271b6c5801b6af9a9f0e46805528b244 commit 7f39284c271b6c5801b6af9a9f0e46805528b244 Author: Mark Johnston AuthorDate: 2021-07-29 14:14:05 +0000 Commit: Mark Johnston 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);