Skip to content

IPIs

enum ipi_mask_flags (2 variants) source
§ IPI_MASK_EXACT = 0

Only CPUs in the mask take the IPI

§ IPI_MASK_SUPERSET_OK = 1 << 0

Others may too

void ipi_send(cpu_id_t cpu, uint8_t vector)
source
bool ipi_send_try(cpu_id_t cpu, uint8_t vector)
source

Fails instead of waiting if a send is still in flight

size_t ipi_send_cost(const struct cpu_mask *targets)
source

How many IPIs does it take to bother targets?

void ipi_send_mask(
    const struct cpu_mask *targets,
    uint8_t vector,
    enum ipi_mask_flags flags
)
source

Picks shorthand / KVM PV / x2APIC cluster / physical per call

void nmi_send(cpu_id_t cpu)
source
void nmi_send_others(cpu_id_t self)
source

NMIs every CPU except self, for the panic path

#define IPI_BCAST_RATIO_Q8 (16 * 256)
source

Broadcast instead of exact if (sends_needed - 1) * 256 >= bystanders * IPI_BCAST_RATIO_Q8 where ratio is (bystander interrupt cost / cost of one send)