From: Yazen Ghannam <yazen.ghannam@amd.com>
To: Borislav Petkov <bp@alien8.de>
Cc: yazen.ghannam@amd.com, linux-edac@vger.kernel.org,
linux-kernel@vger.kernel.org, tony.luck@intel.com,
x86@kernel.org
Subject: Re: [PATCH] x86/mce: Schedule mce_setup() on correct CPU for CPER decoding
Date: Thu, 15 Jun 2023 11:34:21 -0400 [thread overview]
Message-ID: <c9f885df-4650-248c-3708-9250a0b530dc@amd.com> (raw)
In-Reply-To: <20230615152031.GCZIssPyJjGcikn9iA@fat_crate.local>
On 6/15/2023 11:20 AM, Borislav Petkov wrote:
> On Mon, Apr 17, 2023 at 04:20:06PM +0000, Yazen Ghannam wrote:
>> @@ -97,20 +102,13 @@ int apei_smca_report_x86_error(struct cper_ia_proc_ctx *ctx_info, u64 lapic_id)
>> if (ctx_info->reg_arr_size < 48)
>> return -EINVAL;
>>
>> - mce_setup(&m);
>> -
>> - m.extcpu = -1;
>> - m.socketid = -1;
>> -
>> - for_each_possible_cpu(cpu) {
>> - if (cpu_data(cpu).initial_apicid == lapic_id) {
>> - m.extcpu = cpu;
>> - m.socketid = cpu_data(m.extcpu).phys_proc_id;
>> + for_each_possible_cpu(cpu)
>> + if (cpu_data(cpu).initial_apicid == lapic_id)
>> break;
>> - }
>> - }
>>
>> - m.apicid = lapic_id;
>> + if (smp_call_function_single(cpu, __mce_setup, &m, 1))
>
> I can see the following call-chain from NMI context which is a no-no:
>
> ghes_notify_nmi
> |-> ghes_in_nmi_spool_from_list
> |-> ghes_in_nmi_queue_one_entry
> |-> __ghes_panic
> |-> __ghes_print_estatus
> |-> cper_estatus_print
> |-> cper_estatus_print_section
> |-> cper_print_proc_ia
> |-> arch_apei_report_x86_error
> |-> apei_smca_report_x86_error
> |-> smp_call_function_single
>
>
Right, but in practice SMCA errors are not reported through GHES at
runtime. They will only come in through BERT at boot time. There aren't
any plans to change this, so the NMI issue won't be encountered.
I can include this info in the commit message and/or code comments. Is
this okay?
We can solve the NMI issue if it ever comes up in the future. Unless
there's an obvious change to avoid this now. Any suggestions?
Thanks,
Yazen
next prev parent reply other threads:[~2023-06-15 15:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-17 16:20 [PATCH] x86/mce: Schedule mce_setup() on correct CPU for CPER decoding Yazen Ghannam
2023-04-17 17:17 ` Luck, Tony
2023-04-17 17:28 ` Yazen Ghannam
2023-04-17 17:39 ` Luck, Tony
2023-06-09 14:26 ` Yazen Ghannam
2023-06-15 15:20 ` Borislav Petkov
2023-06-15 15:34 ` Yazen Ghannam [this message]
2023-06-15 16:20 ` Borislav Petkov
2023-06-15 17:02 ` Yazen Ghannam
2023-06-15 17:39 ` Yazen Ghannam
2023-06-15 17:54 ` Luck, Tony
2023-06-16 14:16 ` Yazen Ghannam
2023-06-16 16:05 ` Luck, Tony
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=c9f885df-4650-248c-3708-9250a0b530dc@amd.com \
--to=yazen.ghannam@amd.com \
--cc=bp@alien8.de \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
/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