Purpose of self-IPI on IA-32

interrupt, kernel, osdev, x86

Solution

I guess you have already known the reason since 2 years have passed.

But here's my understanding:

IPI can be blocked when IRQ is disabled, it is kept by the IOAPIC, until the destined core re-enables IRQ with an sti instruction. However an int instruction always traps the CPU into a lower ring level, no matter whether IRQ is enabled or not.

So maybe self-IPI is needed when the kernel wants to do something, but not now when the IRQ is disabled. Thus, it sends itself an IPI, making such interrupt happens as soon as the IRQ on that core is re-enabled.

Problem

What is the purpose of a processor sending an Inter Processor Interrupt to itself on the IA-32 architecture? According to the Intel IA-32 Architecture Software Developer's Manual, Vol. 3, Ch. 10.1: IPIs are used for software self-interrupts, interrupt forwarding, or preemptive scheduling. But why would you use a self IPI when the processor can also interrupt itself with an INT instruction? This feature seems to be redundant.

Original source