Skip to main content

n3_migrate_ipi_entry

Function n3_migrate_ipi_entry 

Source
pub unsafe extern "C" fn n3_migrate_ipi_entry(rdi: *mut u8) -> !
Expand description

Naked IPI handler for N3 migration synchronization.

When a cross-core migration completes, the receiver sends this IPI to the sender’s core. The handler restores the sender’s kernel context (RSP, RIP, RFLAGS) from MigrationFrame.src_ctx and returns via iretq.

The interrupted context was the sender’s send() function. By modifying the InterruptStackFrame fields before the hardware iretq, we redirect execution to the sender’s saved return address on its original kernel stack.

§Safety

Registered as a naked IDT entry. On entry: SS, RSP, RFLAGS, CS, RIP pushed by hardware. rdi points at the InterruptStackFrame (set by IDT dispatch).