HomeFreeBSD

Wait longer for a previous IPI to be sent

Description

Wait longer for a previous IPI to be sent

When sending an IPI, if a previous IPI is still pending delivery,
native_lapic_ipi_vectored() waits for the previous IPI to be sent.
We've seen a few inexplicable panics with the current timeout of 50 ms.
Increase the timeout to 1 second and make it tunable.

No hardware specification mentions a timeout in this case; I checked
the Intel SDM, Intel MP spec, and Intel x2APIC spec. Linux and illumos
wait forever. In Linux, see __default_send_IPI_shortcut() in
arch/x86/kernel/apic/ipi.c. In illumos, see apic_send_ipi() in
usr/src/uts/i86pc/io/pcplusmp/apic_common.c. However, misbehaving hardware
could hang the system if we wait forever.

Reviewed by: mav kib
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D29942

Details

Provenance
vangyzenAuthored on Apr 26 2021, 3:01 PM
Reviewer
mav
Differential Revision
D29942: Wait longer for a previous IPI to be sent
Parents
rGeda28feb2e07: EFI secure boot VECTX related changes
Branches
Unknown
Tags
Unknown