Skip to content
  • Alexander Motin's avatar
    Make lapic_ipi_vectored(APIC_IPI_DEST_SELF) NMI safe. · 23ce4620
    Alexander Motin authored
    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.
    23ce4620