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 13:39:41 -0400 [thread overview]
Message-ID: <da1f680b-f601-0e64-bdb4-1aa5b6fc6175@amd.com> (raw)
In-Reply-To: <d1333fa6-34e1-8b2a-b772-369776428eae@amd.com>
On 6/15/2023 1:02 PM, Yazen Ghannam wrote:
> On 6/15/2023 12:20 PM, Borislav Petkov wrote:
>> On Thu, Jun 15, 2023 at 11:34:21AM -0400, Yazen Ghannam wrote:
>>> 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?
>>
>> Yes, solve it right from the get-go. "It cannot happen now" is not good
>> enough. It should not be even technically possible.
>>
>
> Okay, understood.
>
>> Just report what's logged into BERT - nothing more. Whoever needs the
>> remaining info, can dump it from the machine.
>>
>
> Will do.
>
How about these changes? I can split this into separate preemption and
PPIN patches.
The PPIN isn't coming directly from BERT. But it seems we can use the
per_cpu value which is set up during CPU init.
Thanks,
Yazen
diff --git a/arch/x86/kernel/cpu/mce/apei.c b/arch/x86/kernel/cpu/mce/apei.c
index 8ed341714686..db16dc3c7b03 100644
--- a/arch/x86/kernel/cpu/mce/apei.c
+++ b/arch/x86/kernel/cpu/mce/apei.c
@@ -97,15 +97,19 @@ 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;
+ get_cpu();
mce_setup(&m);
+ put_cpu();
m.extcpu = -1;
m.socketid = -1;
+ m.ppin = 0;
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;
+ m.ppin = cpu_data(m.extcpu).ppin;
break;
}
}
next prev parent reply other threads:[~2023-06-15 17:40 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
2023-06-15 16:20 ` Borislav Petkov
2023-06-15 17:02 ` Yazen Ghannam
2023-06-15 17:39 ` Yazen Ghannam [this message]
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=da1f680b-f601-0e64-bdb4-1aa5b6fc6175@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