Page MenuHomeFreeBSD

lapic: skip setting intrcnt if lapic is not present
ClosedPublic

Authored by royger on Sep 4 2018, 3:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 15 2024, 7:02 PM
Unknown Object (File)
Mar 13 2024, 1:12 AM
Unknown Object (File)
Dec 20 2023, 12:54 AM
Unknown Object (File)
Dec 15 2023, 9:04 AM
Unknown Object (File)
Dec 1 2023, 9:39 PM
Unknown Object (File)
Sep 26 2023, 1:53 AM
Unknown Object (File)
Aug 24 2023, 6:01 PM
Unknown Object (File)
Aug 18 2023, 1:53 AM
Subscribers

Details

Summary

Instead of panicking. Legacy PVH mode doesn't provide a lapic, and
since native_lapic_intrcnt is called unconditionally this would cause
the assert to trigger. Change the assert into a continue in order to
take into account the possibility of systems without a lapic.

Sponsored by: Citrix Systems R&D

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/x86/x86/local_apic.c
852 ↗(On Diff #47641)

Is there a single check we can do here to skip the entire loop? Alternatively, would it be cleaner perhaps to add a new apic_ops hook?

sys/x86/x86/local_apic.c
852 ↗(On Diff #47641)

I cannot see an easy check. lapics is allocated in apic_setup_local as long as there's a valid enumerator. I think this would be better part of the struct pic somehow rather than apic_ops?

jhb added inline comments.
sys/x86/x86/local_apic.c
852 ↗(On Diff #47641)

I don't think a pic method would help (and if so I could probably just reuse the existing "register_sources" hook) as the lapic PIC is added in apic_setup_local as well. I guess your existing patch is the best approach for now.

This revision is now accepted and ready to land.Sep 6 2018, 5:52 PM
This revision was automatically updated to reflect the committed changes.