All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Borislav Petkov <bp@alien8.de>
Cc: Zeng Heng <zengheng4@huawei.com>,
	michael.roth@amd.com, hpa@zytor.com, tglx@linutronix.de,
	sathyanarayanan.kuppuswamy@linux.intel.com,
	kirill.shutemov@linux.intel.com, jroedel@suse.de,
	keescook@chromium.org, mingo@redhat.com,
	dave.hansen@linux.intel.com, linux-kernel@vger.kernel.org,
	x86@kernel.org, liwei391@huawei.com,
	Tony Luck <tony.luck@intel.com>
Subject: Re: [PATCH -v2] x86/boot/compressed: Register dummy NMI handler in EFI boot loader, to avoid kdump crashes
Date: Tue, 10 Jan 2023 13:34:35 +0100	[thread overview]
Message-ID: <Y71bW/8XZCackPLh@gmail.com> (raw)
In-Reply-To: <Y71XPl8br2QU2L8E@zn.tnic>


* Borislav Petkov <bp@alien8.de> wrote:

> > mce_panic -> panic -> __crash_kexec()
> > 
> > Yes?
> > 
> > If so, then we should make sure we have *exited* #MC context before calling
> > panic() and not have to add hacks like this one of adding an empty NMI handler.
> > 
> > But I'm only speculating as it is hard to make sense of all this text.
> 
> IOW, does this help?
> 
> ---
> diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c
> index 7832a69d170e..55437d8a4fad 100644
> --- a/arch/x86/kernel/cpu/mce/core.c
> +++ b/arch/x86/kernel/cpu/mce/core.c
> @@ -287,6 +287,7 @@ static noinstr void mce_panic(const char *msg, struct mce *final, char *exp)
>  		if (panic_timeout == 0)
>  			panic_timeout = mca_cfg.panic_timeout;
>  		panic(msg);
> +		mce_wrmsrl(MSR_IA32_MCG_STATUS, 0);

So your suggestion was to exit MC context 'before' the panic() call - but 
the patch calls it 'after' - was that intentional?

Thanks,

	Ingo

  reply	other threads:[~2023-01-10 12:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-10 10:27 [PATCH] x86/boot/compressed: Register NMI handler in EFI boot loader Zeng Heng
2023-01-10 10:59 ` Ingo Molnar
2023-01-10 12:01   ` [PATCH -v2] x86/boot/compressed: Register dummy NMI handler in EFI boot loader, to avoid kdump crashes Ingo Molnar
2023-01-10 12:11     ` Borislav Petkov
2023-01-10 12:17       ` Borislav Petkov
2023-01-10 12:34         ` Ingo Molnar [this message]
2023-01-10 12:46           ` Borislav Petkov
2023-01-10 12:50           ` Zeng Heng
2023-01-10 12:32       ` Zeng Heng
2023-01-10 12:57         ` Borislav Petkov
2023-01-10 13:42           ` Zeng Heng
2023-01-10 16:09           ` Borislav Petkov
2023-01-12  2:07             ` Zeng Heng
2023-01-10 14:53         ` Borislav Petkov
2023-01-11  3:46           ` Zeng Heng
2023-01-10 14:06     ` Zeng Heng
2023-01-10 11:41 ` [tip: x86/boot] " tip-bot2 for Zeng Heng

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=Y71bW/8XZCackPLh@gmail.com \
    --to=mingo@kernel.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jroedel@suse.de \
    --cc=keescook@chromium.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liwei391@huawei.com \
    --cc=michael.roth@amd.com \
    --cc=mingo@redhat.com \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    --cc=zengheng4@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.