From nobody Mon Sep 16 08:15:06 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4X6d4q3X4Zz5WkMF; Mon, 16 Sep 2024 08:15:07 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X6d4q0m2wz4RtN; Mon, 16 Sep 2024 08:15:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726474507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CJAG2HiWU0O47JzOumxzF6adfeKV8YeDGpzVJLcRp30=; b=FTyQCQIE4hh2muLKyc8Us0t1Oq041mq7afZbA2TFEPPQO4zdpL/ITVOE8taLvkt2FAzK3C qrte838UwrtX4/uU3HEeC6FeZFqXG2AMyE09DUJWV0Zv3CyMDX9vBJMS9BGcAWlE1XzcXQ CVAorljPc2oiuc0PsyUWdzmmr8zgOd3AlK4KY8JSstglsmblIvNoaStfQAbxK6GABco9fn RSxo3+snFRTNI61IAp5F6cN+qDu/Wa9YmSy66RgA51TuDdZXLub7Ucr0UTGhJkGWnYN4Li PuN5knYqWs9OWQKrv77A6JRLFQwl8401sD3tG5vEI9COE0rYSrHj9YK1TtId/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726474507; a=rsa-sha256; cv=none; b=IfBcTg+u+xmdu+d/obDu5QheiSF71lkQiBjCagS4CCJ/rTMurn8xaxcrjDyLa/ASaDsaOn 72rVhPjZZICTTbFJ3eJDZbI7KEx/n0roxMX6k5O2ldKSeQGjKsh/DxN2XKHbKVvUp5t2dl ONVHQacohkrXKvmdvJKalH9iSOFukVzI/DxLa7ezz5YC3dQ5OgsEpm/p3x8f/Ivhpzj1Gz traMb1vOqerp3AOeg/LHWA6gIbvPh1ZeS0ZvcbKLaSyUrY2x2SjMSMYT6gYvvTh4QzFoy/ sSQXSdA1LyQehvsoeTnbUb4B5D4/+XOCF/iho8YJCAvz9Vudz78524TeovFJgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726474507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CJAG2HiWU0O47JzOumxzF6adfeKV8YeDGpzVJLcRp30=; b=XjYqBOrCGqaV5qR/DpDdiJxMkn2jz5yIKT5aNgUhwrE8hAhYxHAh6haW5PIQwq+uA/5xlh QJpcCpOYUjgbwmcRBEYLKFeM3B5LboQNlhsLc+FjbUkpsBYq3pvLwFbWcP8GM4Nt4ENMKK Vou/5yI2vqYLtmefScehYWeXQYUZWyitE0oy9xozy/aBhSphoDeQ8sODjiw69RRIjbwtFp R1I8zesnisT7rZwCYTgCt7Zeqs2FpHeEQmHIW1cGR4dPyfIrg9LUfV6hemgYvE0NyNUzuf EbzzDKVYdcY7Tu+6fzJJuAAFkRAq0PX7DjhmVFMvUEkRUNPCaNCcyBs7WlX6gg== 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 4X6d4p5Yn0zmtv; Mon, 16 Sep 2024 08:15:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48G8F6GQ027146; Mon, 16 Sep 2024 08:15:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48G8F6Kc027143; Mon, 16 Sep 2024 08:15:06 GMT (envelope-from git) Date: Mon, 16 Sep 2024 08:15:06 GMT Message-Id: <202409160815.48G8F6Kc027143@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: b7ea2b69ef66 - main - amd64 la57_trampoline: disable EFER.LME around setting CR4.LA57 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b7ea2b69ef666ee8cdc6dcc814d610df0a7f0999 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b7ea2b69ef666ee8cdc6dcc814d610df0a7f0999 commit b7ea2b69ef666ee8cdc6dcc814d610df0a7f0999 Author: Konstantin Belousov AuthorDate: 2024-09-11 00:39:30 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-16 08:09:38 +0000 amd64 la57_trampoline: disable EFER.LME around setting CR4.LA57 Changing paging mode while LME is set seems to be not allowed. Sponsored by: Advanced Micro Devices (AMD) Sponsored by: jThe FreeBSD Foundation MFC after: 1 week --- sys/amd64/amd64/locore.S | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/amd64/amd64/locore.S b/sys/amd64/amd64/locore.S index 86db0f76b22b..9a991402cdc2 100644 --- a/sys/amd64/amd64/locore.S +++ b/sys/amd64/amd64/locore.S @@ -114,11 +114,21 @@ l1: movl $(3<<3),%eax andl $~CR0_PG,%eax movl %eax,%cr0 + movl $MSR_EFER,%ecx + rdmsr + andl $~EFER_LME,%eax + wrmsr + movl %cr4,%eax orl $CR4_LA57,%eax movl %eax,%cr4 movl %edi,%cr3 + + rdmsr + orl $EFER_LME,%eax + wrmsr + movl %ebp,%cr0 jmp 1f