mce.c (3eb66e91a25497065c5322b1268cbc3953642227) mce.c (c05772018491e5294f55d63b239ab0d532e96616)
1/*
2 * Machine check exception handling.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *

--- 287 unchanged lines hidden (view full) ---

296
297 /*
298 * For now just print it to console.
299 * TODO: log this error event to FSP or nvram.
300 */
301 while (__this_cpu_read(mce_queue_count) > 0) {
302 index = __this_cpu_read(mce_queue_count) - 1;
303 evt = this_cpu_ptr(&mce_event_queue[index]);
1/*
2 * Machine check exception handling.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *

--- 287 unchanged lines hidden (view full) ---

296
297 /*
298 * For now just print it to console.
299 * TODO: log this error event to FSP or nvram.
300 */
301 while (__this_cpu_read(mce_queue_count) > 0) {
302 index = __this_cpu_read(mce_queue_count) - 1;
303 evt = this_cpu_ptr(&mce_event_queue[index]);
304 machine_check_print_event_info(evt, false);
304 machine_check_print_event_info(evt, false, false);
305 __this_cpu_dec(mce_queue_count);
306 }
307}
308
309void machine_check_print_event_info(struct machine_check_event *evt,
305 __this_cpu_dec(mce_queue_count);
306 }
307}
308
309void machine_check_print_event_info(struct machine_check_event *evt,
310 bool user_mode)
310 bool user_mode, bool in_guest)
311{
312 const char *level, *sevstr, *subtype;
313 static const char *mc_ue_types[] = {
314 "Indeterminate",
315 "Instruction fetch",
316 "Page table walk ifetch",
317 "Load/Store",
318 "Page table walk Load/Store",

--- 63 unchanged lines hidden (view full) ---

382 sevstr = "Fatal";
383 break;
384 }
385
386 printk("%s%s Machine check interrupt [%s]\n", level, sevstr,
387 evt->disposition == MCE_DISPOSITION_RECOVERED ?
388 "Recovered" : "Not recovered");
389
311{
312 const char *level, *sevstr, *subtype;
313 static const char *mc_ue_types[] = {
314 "Indeterminate",
315 "Instruction fetch",
316 "Page table walk ifetch",
317 "Load/Store",
318 "Page table walk Load/Store",

--- 63 unchanged lines hidden (view full) ---

382 sevstr = "Fatal";
383 break;
384 }
385
386 printk("%s%s Machine check interrupt [%s]\n", level, sevstr,
387 evt->disposition == MCE_DISPOSITION_RECOVERED ?
388 "Recovered" : "Not recovered");
389
390 if (user_mode) {
390 if (in_guest) {
391 printk("%s Guest NIP: %016llx\n", level, evt->srr0);
392 } else if (user_mode) {
391 printk("%s NIP: [%016llx] PID: %d Comm: %s\n", level,
392 evt->srr0, current->pid, current->comm);
393 } else {
394 printk("%s NIP [%016llx]: %pS\n", level, evt->srr0,
395 (void *)evt->srr0);
396 }
397
398 printk("%s Initiator: %s\n", level,

--- 227 unchanged lines hidden ---
393 printk("%s NIP: [%016llx] PID: %d Comm: %s\n", level,
394 evt->srr0, current->pid, current->comm);
395 } else {
396 printk("%s NIP [%016llx]: %pS\n", level, evt->srr0,
397 (void *)evt->srr0);
398 }
399
400 printk("%s Initiator: %s\n", level,

--- 227 unchanged lines hidden ---