From nobody Tue Oct 27 12:01:16 2026 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 4jDTbw6jM7z6xTPk for ; Tue, 27 Oct 2026 12:01:16 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jDTbw5nvrz3D6V for ; Tue, 27 Oct 2026 12:01:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793102476; 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=yCWhET8NjEQkrJo0OcMOMkWegJnKtbEYbsXMq7Ti/EM=; b=aCt4NpICBJwzs4sBFSTH92JreT2AXZmRIjsys6HqlKtVRvM18iAwx9RYGfIJWHNAmrp7xn QntXFWSGFF3JQK8ksVdh6xcSa+wSKqeim7ebKLQIrrv6j8MhtokdMUtOgL7BOhBcSIW65o zwc3cVZRGndA5uFDGi9U+1dP/paOKjlrLTcYV2Kg6zTSFCYSiacA6Bu9cc20QHGRwUj63x DmXvIqOe2+1Cyq+k7+Bky5oA9M7bgblL1lL/WMQ01WQZPi1jXZDtt57Qs20RK2ygAFwC95 VN+8RFNZtGT1X3RX8lZz14gd/8BGHC14JG0/2LnNZnKyc3ItaR4Sr173KchGHg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793102476; b=yYm9ihU2uYbJoJhdIb8SVly1U6Auf1WsjNOVEzK5zmksCaaDE+Ow/xKdyLlRLJKeB7B3Cm hdROcbgUNMlsJXXlmnAvuGPyyLb8aaMfHYTIFbiK7B6V9cN9OTUf7FOg9tOihpAjiLCzym boTD/4mylSDXPzl0OIf6NAF8XFCvIZfmWsU5r0tqyJ8r5xMDtNwCTr0kn1+EjReHk9+4tR 6UzSzU7yBDUD/zFpikntxOt31zvpRIu/vwt63ev1VtecxhDhhNPCkeL4zt4YxEutiE4YpO 6z9KwZv6ZXcntIn8scbxJWnYLs0UhrXNtmcfYvAc+Mk+mT7ECDV+C/ITyOLx6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793102476; 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=yCWhET8NjEQkrJo0OcMOMkWegJnKtbEYbsXMq7Ti/EM=; b=ObsdXNZKZXBWZo/64rmEqtQVjiKQJn3bAUzLc1BUD0Gg2lYxRz50Db00n4RSiSOS4LU/Ho uu2/XIqgA4cAjxWFwzJ+bVyNFg08M3YVIA8HT4dbntM46OrIy+kpGZouNGN8P5IdQjK8EP GUGGkCtj1R5w8UhsOHTXLnQo9PG6ne9RR+X175eHstKjkfGM5fsERG+hdPESLfrPh9PfY2 bG1dbiPYDF0j+h9wg5g0DBhT8A/MKek+1TXr6EH/CuRg4K1NEhbkDWnV+j65L0WS1qQO+c ykj33PME3YfIl5ZxMrVp5C59MziCwv3MS4O/YRP3LBo857Dx6y1dHl9vPsTlrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jDTbw5SQdzKDX for ; Tue, 27 Oct 2026 12:01:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32884 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 27 Oct 2026 12:01:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 787e2e411d2a - main - amd64_cpu_init_fred(): set stack level for NMI and not #NM List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 787e2e411d2a169fd28581f9bbf1e87c51757303 Auto-Submitted: auto-generated Date: Tue, 27 Oct 2026 12:01:16 +0000 Message-Id: <6ae0928c.32884.5d47cdef@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=787e2e411d2a169fd28581f9bbf1e87c51757303 commit 787e2e411d2a169fd28581f9bbf1e87c51757303 Author: Konstantin Belousov AuthorDate: 2026-10-27 08:54:43 +0000 Commit: Konstantin Belousov CommitDate: 2026-10-27 11:58:48 +0000 amd64_cpu_init_fred(): set stack level for NMI and not #NM Fixes: 6e93f5e4d693 ("amd64: FRED support") Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/amd64/amd64/initcpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/amd64/amd64/initcpu.c b/sys/amd64/amd64/initcpu.c index 6ca89f2b36d4..5eac340505c2 100644 --- a/sys/amd64/amd64/initcpu.c +++ b/sys/amd64/amd64/initcpu.c @@ -451,14 +451,14 @@ amd64_cpu_init_fred(void) /* * With FRED, there is no need for workarounds requiring * dedicated stack for #DB. Also, there is no need to have - * separate stacks for #NM and #MC, because CSL rules ensure + * separate stacks for NMI and #MC, because CSL rules ensure * that interrupted frame is safe even if NMI was interrupted * by machine check or vice versa. * * Still, we need to provide a stack for events that can occur * with the interrupts disabled, to avoid caring about the * ordering of the context update in cpu_switch.S. Use CSL 1 - * for #NM and #MC. + * for NMI and #MC. * * Since double fault handler is used to handle stack * overflow, it gets the dedicated stack, of the highest used @@ -467,7 +467,7 @@ amd64_cpu_init_fred(void) * CSL 3 is unused, and we have some space to re-arrange this * if a need in the future appears. */ - wrmsr(MSR_FRED_STKLVLS, (1ul << (IDT_NM * 2)) | + wrmsr(MSR_FRED_STKLVLS, (1ul << (IDT_NMI * 2)) | (1ul << (IDT_MC * 2)) | (2ul << (IDT_DF * 2))); wrmsr(MSR_FRED_RSP3, 0); load_cr4(rcr4() | CR4_FRED);