From: "Huang, Kai" <kai.huang@intel.com>
To: "Mehta, Sohil" <sohil.mehta@intel.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"mingo@redhat.com" <mingo@redhat.com>,
"x86@kernel.org" <x86@kernel.org>
Cc: "Nikula, Jani" <jani.nikula@intel.com>,
"bp@alien8.de" <bp@alien8.de>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
"peterz@infradead.org" <peterz@infradead.org>,
"hpa@zytor.com" <hpa@zytor.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kirill.shutemov@linux.intel.com"
<kirill.shutemov@linux.intel.com>,
"rppt@kernel.org" <rppt@kernel.org>,
"bigeasy@linutronix.de" <bigeasy@linutronix.de>,
"jpoimboe@kernel.org" <jpoimboe@kernel.org>,
"pmladek@suse.com" <pmladek@suse.com>,
"xin@zytor.com" <xin@zytor.com>,
"Luck, Tony" <tony.luck@intel.com>
Subject: Re: [PATCH 1/9] x86/nmi: Simplify unknown NMI panic handling
Date: Mon, 31 Mar 2025 22:52:13 +0000 [thread overview]
Message-ID: <192fb9f452909e722cf353cfc1bbea322e2f2cd5.camel@intel.com> (raw)
In-Reply-To: <20250327234629.3953536-2-sohil.mehta@intel.com>
On Thu, 2025-03-27 at 23:46 +0000, Mehta, Sohil wrote:
> The unknown_nmi_panic variable is used to control whether the kernel
> should panic on unknown NMIs. There is a sysctl entry for the same, which
> can be used to change the behavior at runtime.
>
> However, it seems that in some places, the option unnecessarily depends
> on CONFIG_X86_LOCAL_APIC. Other code in nmi.c uses unknown_nmi_panic
> without such a dependency. This results in a few messy #ifdefs
> splattered across the code. The dependency was likely introduce due to a
^
introduced
[...]
> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
> index c7164a8de983..c3e1ae7373e9 100644
> --- a/arch/x86/kernel/setup.c
> +++ b/arch/x86/kernel/setup.c
> @@ -7,10 +7,11 @@
> */
> #include <linux/acpi.h>
> #include <linux/console.h>
> -#include <linux/cpu.h>
> #include <linux/crash_dump.h>
> +#include <linux/cpu.h>
This code change doesn't seem to be able to make the headers in "alphabetical
order".
> #include <linux/dma-map-ops.h>
> #include <linux/efi.h>
> +#include <linux/hugetlb.h>
> #include <linux/ima.h>
> #include <linux/init_ohci1394_dma.h>
> #include <linux/initrd.h>
> @@ -18,21 +19,19 @@
> #include <linux/memblock.h>
> #include <linux/panic_notifier.h>
> #include <linux/pci.h>
> +#include <linux/random.h>
> #include <linux/root_dev.h>
> -#include <linux/hugetlb.h>
> -#include <linux/tboot.h>
> -#include <linux/usb/xhci-dbgp.h>
> #include <linux/static_call.h>
> #include <linux/swiotlb.h>
> -#include <linux/random.h>
> +#include <linux/tboot.h>
> +#include <linux/usb/xhci-dbgp.h>
> +#include <linux/vmalloc.h>
>
> #include <uapi/linux/mount.h>
>
> #include <xen/xen.h>
>
> #include <asm/apic.h>
> -#include <asm/efi.h>
Seems this header just got removed here but was never added back.
> -#include <asm/numa.h>
> #include <asm/bios_ebda.h>
> #include <asm/bugs.h>
> #include <asm/cacheinfo.h>
> @@ -47,18 +46,16 @@
> #include <asm/mce.h>
> #include <asm/memtype.h>
> #include <asm/mtrr.h>
> -#include <asm/realmode.h>
> +#include <asm/nmi.h>
> +#include <asm/numa.h>
> #include <asm/olpc_ofw.h>
> #include <asm/pci-direct.h>
> #include <asm/prom.h>
> #include <asm/proto.h>
> +#include <asm/realmode.h>
> #include <asm/thermal.h>
> #include <asm/unwind.h>
> #include <asm/vsyscall.h>
> -#include <linux/vmalloc.h>
> -#if defined(CONFIG_X86_LOCAL_APIC)
> -#include <asm/nmi.h>
> -#endif
>
[...]
next prev parent reply other threads:[~2025-03-31 22:52 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-27 23:46 [PATCH 0/9] x86: Cleanup NMI handling Sohil Mehta
2025-03-27 23:46 ` [PATCH 1/9] x86/nmi: Simplify unknown NMI panic handling Sohil Mehta
2025-03-31 22:52 ` Huang, Kai [this message]
2025-03-31 23:01 ` Sohil Mehta
2025-04-01 15:00 ` Nikolay Borisov
2025-04-01 15:54 ` Sohil Mehta
2025-04-03 13:33 ` [tip: x86/nmi] " tip-bot2 for Sohil Mehta
2025-03-27 23:46 ` [PATCH 2/9] x86/nmi: Consolidate NMI panic variables Sohil Mehta
2025-03-31 22:43 ` Huang, Kai
2025-03-31 22:50 ` Sohil Mehta
2025-03-31 23:05 ` Huang, Kai
2025-03-31 23:20 ` Sohil Mehta
2025-04-01 1:06 ` Huang, Kai
2025-04-01 5:46 ` Sohil Mehta
2025-04-01 8:08 ` Huang, Kai
2025-04-03 13:33 ` [tip: x86/nmi] " tip-bot2 for Sohil Mehta
2025-03-27 23:46 ` [PATCH 3/9] x86/nmi: Use a macro to initialize NMI descriptors Sohil Mehta
2025-03-31 23:46 ` Huang, Kai
2025-04-03 13:33 ` [tip: x86/nmi] " tip-bot2 for Sohil Mehta
2025-03-27 23:46 ` [PATCH 4/9] x86/nmi: Remove export of local_touch_nmi() Sohil Mehta
2025-03-31 23:47 ` Huang, Kai
2025-04-03 13:33 ` [tip: x86/nmi] " tip-bot2 for Sohil Mehta
2025-03-27 23:46 ` [PATCH 5/9] x86/nmi: Fix comment in unknown NMI handling Sohil Mehta
2025-04-01 0:17 ` Huang, Kai
2025-04-01 5:28 ` Sohil Mehta
2025-04-01 5:45 ` H. Peter Anvin
2025-04-01 5:53 ` Sohil Mehta
2025-04-03 13:33 ` [tip: x86/nmi] x86/nmi: Fix comment in unknown_nmi_error() tip-bot2 for Sohil Mehta
2025-03-27 23:46 ` [PATCH 6/9] x86/nmi: Improve and relocate NMI handler comments Sohil Mehta
2025-04-01 1:03 ` Huang, Kai
2025-04-03 13:33 ` [tip: x86/nmi] " tip-bot2 for Sohil Mehta
2025-03-27 23:46 ` [PATCH 7/9] x86/nmi: Improve NMI header documentation Sohil Mehta
2025-03-31 10:47 ` Ingo Molnar
2025-03-31 16:04 ` Sohil Mehta
2025-03-31 21:36 ` Sohil Mehta
2025-04-01 8:08 ` Ingo Molnar
2025-04-01 16:11 ` Sohil Mehta
2025-04-03 13:33 ` [tip: x86/nmi] x86/nmi: Add missing description x86_platform_ops::get_nmi_reason to <asm/x86_init.h> tip-bot2 for Sohil Mehta
2025-04-03 13:33 ` [tip: x86/nmi] x86/nmi: Improve <asm/nmi.h> documentation tip-bot2 for Sohil Mehta
2025-03-27 23:46 ` [PATCH 8/9] x86/nmi: Clean up NMI selftest Sohil Mehta
2025-04-03 13:33 ` [tip: x86/nmi] " tip-bot2 for Sohil Mehta
2025-03-27 23:46 ` [PATCH 9/9] x86/nmi: Improve NMI duration console print Sohil Mehta
2025-04-01 0:42 ` Huang, Kai
2025-04-03 13:33 ` [tip: x86/nmi] x86/nmi: Improve NMI duration console printouts tip-bot2 for Sohil Mehta
2025-04-01 14:54 ` [PATCH 0/9] x86: Cleanup NMI handling Peter Zijlstra
2025-04-01 16:00 ` Nikolay Borisov
2025-04-02 15:13 ` H. Peter Anvin
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=192fb9f452909e722cf353cfc1bbea322e2f2cd5.camel@intel.com \
--to=kai.huang@intel.com \
--cc=bigeasy@linutronix.de \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jani.nikula@intel.com \
--cc=jpoimboe@kernel.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=rppt@kernel.org \
--cc=sohil.mehta@intel.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.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