diff options
author | NOMURA JUNICHI(野村 淳一) <junichi.nomura@nec.com> | 2024-02-02 06:51:58 +0300 |
---|---|---|
committer | Borislav Petkov (AMD) <bp@alien8.de> | 2024-02-06 12:51:11 +0300 |
commit | ac456ca0af4fe9630cf84e7efd20b7f7bf596aab (patch) | |
tree | eb5157d638000904ed39208de9197e1cf61d3287 /arch/x86/boot/compressed/misc.c | |
parent | 9ba8ec8ee67a00eb5631364e4b716f35559724d4 (diff) | |
download | linux-ac456ca0af4fe9630cf84e7efd20b7f7bf596aab.tar.xz |
x86/boot: Add a message about ignored early NMIs
Commit
78a509fba9c9 ("x86/boot: Ignore NMIs during very early boot")
added an empty handler in early boot stage to avoid boot failure due to
spurious NMIs.
Add a diagnostic message to show that early NMIs have occurred.
[ bp: Touchups. ]
[ Committer note: tested by stopping the guest really early and
injecting NMIs through qemu's monitor. Result:
early console in setup code
Spurious early NMIs ignored: 13
... ]
Suggested-by: Borislav Petkov <bp@alien8.de>
Suggested-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Jun'ichi Nomura <junichi.nomura@nec.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Link: https://lore.kernel.org/lkml/20231130103339.GCZWhlA196uRklTMNF@fat_crate.local
Diffstat (limited to 'arch/x86/boot/compressed/misc.c')
-rw-r--r-- | arch/x86/boot/compressed/misc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c index bf2aac4f195e..bd6857a9f15a 100644 --- a/arch/x86/boot/compressed/misc.c +++ b/arch/x86/boot/compressed/misc.c @@ -52,6 +52,7 @@ struct port_io_ops pio_ops; memptr free_mem_ptr; memptr free_mem_end_ptr; +int spurious_nmi_count; static char *vidmem; static int vidport; @@ -506,6 +507,12 @@ asmlinkage __visible void *extract_kernel(void *rmode, unsigned char *output) /* Disable exception handling before booting the kernel */ cleanup_exception_handling(); + if (spurious_nmi_count) { + error_putstr("Spurious early NMIs ignored: "); + error_putdec(spurious_nmi_count); + error_putstr("\n"); + } + return output + entry_offset; } |