HomeFreeBSD

Make lapic_ipi_vectored(APIC_IPI_DEST_SELF) NMI safe.

Description

Make lapic_ipi_vectored(APIC_IPI_DEST_SELF) NMI safe.

Sending IPI to self or all CPUs does not require write into upper part of
the ICR, prone to races. Previously the code disabled interrupts, but it
was not enough for NMIs. Instead of that when possible write only lower
part of the register, or use special SELF IPI register in x2APIC mode.

This also removes ICR reads used to preserve reserved bits on write.
It was there from the beginning, but I failed to find explanation why,
neither I see Linux doing it. Specification even tells that ICR content
may be lost in deep C-states, so if hardware does not bother to preserve
it, why should we?

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.

Details

Provenance
mavAuthored on
Parents
rS363489: dwmmc: Add MMCCAM part
Branches
Unknown
Tags
Unknown