Page MenuHomeFreeBSD

x86: print MCAs to the console before MCA initialization
AbandonedPublic

Authored by jtl on Mon, Oct 6, 6:40 PM.
Tags
None
Referenced Files
F133332059: D52943.diff
Sat, Oct 25, 12:04 AM
Unknown Object (File)
Tue, Oct 21, 2:16 AM
Unknown Object (File)
Tue, Oct 21, 2:16 AM
Unknown Object (File)
Mon, Oct 20, 4:32 PM
Unknown Object (File)
Tue, Oct 7, 4:09 PM
Unknown Object (File)
Tue, Oct 7, 6:18 AM
Unknown Object (File)
Tue, Oct 7, 5:26 AM
Unknown Object (File)
Tue, Oct 7, 4:48 AM
Subscribers

Details

Reviewers
jhb
markj
glebius
Summary

This closes a theoretical race if a message arrives after the interrupts are configured, but before the MCA system is fully initialized.

Note that I am not 100% sure this can actually happen, since I am not 100% sure we will ever enable interrupts before we run mca_setup(). Some other hints in the code (for example, the previous checks for 'cold') make it seem possible.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

jtl requested review of this revision.Mon, Oct 6, 6:40 PM
This revision is now accepted and ready to land.Tue, Oct 7, 5:42 AM

Note that I am not 100% sure this can actually happen, since I am not 100% sure we will ever enable interrupts before we run mca_setup().

I don't quite follow, MCEs will be delivered even if interrupts are disabled. _mca_init() enables delivery of MCEs at SI_SUB_CPU time; what's wrong with calling mca_record_entry() after that point?

Note that I am not 100% sure this can actually happen, since I am not 100% sure we will ever enable interrupts before we run mca_setup().

I don't quite follow, MCEs will be delivered even if interrupts are disabled. _mca_init() enables delivery of MCEs at SI_SUB_CPU time; what's wrong with calling mca_record_entry() after that point?

Doh. You are correct. The checks for cold (now mca_startup_done) were only for task queues and not other aspects of this.