Skip to content

arm64: multikernel doorbell SGI (IPI_MULTIKERNEL) and foreign-SGI filtering #14

Open

Description

@congwang-mk

Part of the arm64 port.

Cross-kernel doorbell for the message ring, equivalent of MULTIKERNEL_VECTOR + mk_arch_send_ipi() in arch/x86/kernel/smp.c.

  • Reserve one SGI system-wide for multikernel (IPI_MULTIKERNEL in the arch/arm64/kernel/smp.c IPI enum; nr_ipi grows by one).
  • mk_arch_send_ipi(mpidr): gic_send_sgi-style write to ICC_SGI1R_EL1 targeting the MPIDR directly (SGIs are per-target-redistributor, so they cross kernel boundaries with no shared state).
  • Spawn/host handler: call generic_multikernel_interrupt(). Filter SGIs from a kernel that has no instance relationship the same way x86 filters foreign stop NMIs (stopping_cpu == -1 check).
  • The doorbell must work before the spawn's GIC driver is in tenant mode? No: the ring is drained after smp_init, so ordering with the GIC issue is: GIC tenant mode first, then this.

Test: host multikernel_send_ipi_data() to a spawn and back; /proc/interrupts shows the IPI on both sides.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    arm64arm64 port

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions