From: Sohil Mehta <sohil.mehta@intel.com>
To: Dave Hansen <dave.hansen@linux.intel.com>,
Borislav Petkov <bp@alien8.de>
Cc: Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
x86@kernel.org, "H . Peter Anvin" <hpa@zytor.com>,
Xin Li <xin@zytor.com>, Andy Lutomirski <luto@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Binbin Wu <binbin.wu@linux.intel.com>,
Tom Lendacky <thomas.lendacky@amd.com>,
"Chang S . Bae" <chang.seok.bae@intel.com>,
Chao Gao <chao.gao@intel.com>,
Sean Christopherson <seanjc@google.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Dave Hansen <dave.hansen@intel.com>,
Sohil Mehta <sohil.mehta@intel.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] x86/cea: Clean up the exception stack names and declarations
Date: Fri, 20 Nov 2026 15:50:23 -0800 [thread overview]
Message-ID: <20261120235025.2809042-1-sohil.mehta@intel.com> (raw)
Background
----------
This is a simple cleanup of how the x86-64 exception stacks are named and
reached. These patches started out as part [1][2] of the FRED KVM series. They
were prerequisites for the KVM enabling because the original proposal [3] was
to call __this_cpu_ist_top_va() directly from KVM. So the macro had to be
converted to a function and then be exported.
However, KVM is now planning to use a FRED-specific helper [4] which is
compiled into vmlinux so the macro directly works inside it. Therefore, FRED
KVM no longer needs any of this. Though the cleanup itself is still valuable
and makes the code clearer and the comments more accurate.
Motivation
----------
The exception stacks (DF, NMI, DB, MCE, VC) carry names too short for a header
that almost the whole x86 build pulls in, and the stacks themselves are both
declared and looked up by pasting those names into structure member names.
The first patch adds the ESTACK_ prefix to the names and the second patch
indexes the stacks by the enum that callers already pass. This removes most of
the pasting, and leaves the layout, the addresses and the guard pages exactly
as they were.
There is no change in behavior expected.
Changes from the FRED KVM v10
-----------------------------
Patch 1:
- Minor commit message improvements
- Pick up Binbin's review tag
Patch 2:
- Drop the conversion of __this_cpu_ist_{bottom,top}_va() from macros
to functions.
- Expand struct exception_stacks explicitly and drop ESTACKS_MEMBERS()
- Rewrite most of the commit message and drop the prior tags.
Links
-----
[1]: https://lore.kernel.org/lkml/20260911213659.2025974-5-sohil.mehta@intel.com/
[2]: https://lore.kernel.org/lkml/20260911213659.2025974-6-sohil.mehta@intel.com/
[3]: https://lore.kernel.org/all/20251026201911.505204-7-xin@zytor.com/
[4]: https://lore.kernel.org/lkml/20260911213659.2025974-7-sohil.mehta@intel.com/
Sohil Mehta (1):
x86/cea: Index exception stacks by the ordering enum
Xin Li (Intel) (1):
x86/cea: Prefix exception stack names with ESTACK_
arch/x86/coco/sev/noinstr.c | 5 +--
arch/x86/coco/sev/vc-handle.c | 3 +-
arch/x86/include/asm/cpu_entry_area.h | 52 +++++++++++----------------
arch/x86/kernel/cpu/common.c | 10 +++---
arch/x86/kernel/dumpstack_64.c | 18 +++++-----
arch/x86/kernel/fred.c | 6 ++--
arch/x86/kernel/traps.c | 2 +-
arch/x86/mm/cpu_entry_area.c | 14 ++++----
arch/x86/mm/fault.c | 2 +-
9 files changed, 52 insertions(+), 60 deletions(-)
base-commit: 7475ea8b58616b33c04afb976cf0fbaad9dd63fb
--
2.43.0
next reply other threads:[~2026-11-20 23:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 23:50 Sohil Mehta [this message]
2026-11-20 23:50 ` [PATCH 1/2] x86/cea: Prefix exception stack names with ESTACK_ Sohil Mehta
2026-11-20 23:50 ` [PATCH 2/2] x86/cea: Index exception stacks by the ordering enum Sohil Mehta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261120235025.2809042-1-sohil.mehta@intel.com \
--to=sohil.mehta@intel.com \
--cc=binbin.wu@linux.intel.com \
--cc=bp@alien8.de \
--cc=chang.seok.bae@intel.com \
--cc=chao.gao@intel.com \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=seanjc@google.com \
--cc=tglx@kernel.org \
--cc=thomas.lendacky@amd.com \
--cc=x86@kernel.org \
--cc=xin@zytor.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®