Part of the arm64 port.
x86 loads instances through arch/x86/kernel/kexec-vmlinux.c with KEXEC_TYPE_MULTIKERNEL (no purgatory, direct entry, boot_params in the ctrl block). arm64 kexec_file already relocates Image to any 2 MB-aligned physical address (arch/arm64/kernel/kexec_image.c), which is all the placement we need.
- Teach arch/arm64/kernel/machine_kexec_file.c / kexec_image.c about KEXEC_TYPE_MULTIKERNEL: place the Image and DTB inside the instance's memory grant (instance->memory_regions), never in the running kernel's memory, and skip purgatory.
- image->start = Image load address (stock primary_entry is at offset 0 of the Image header's b primary_entry); image->arch.dtb_mem = instance DTB (see DTB issue). These are what mk_arch_spawn_instance() passes to CPU_ON.
- Do not call machine_kexec() paths that shut down the current kernel.
- Cache maintenance: every range the host writes with the MMU on and the spawn reads MMU-off must be cleaned to PoC before CPU_ON (Image, DTB, ctrl block, shared IPI area). Put this in one helper so nobody forgets it on the re-exec path.
- Reuse mk_e820_fill()'s role: the memory grant is rebuilt at exec time (see commit "multikernel grant shortfall" history), so the DTB /memory nodes must be regenerated on every exec, not at load.
Reactions are currently unavailable
Part of the arm64 port.
x86 loads instances through arch/x86/kernel/kexec-vmlinux.c with KEXEC_TYPE_MULTIKERNEL (no purgatory, direct entry, boot_params in the ctrl block). arm64 kexec_file already relocates Image to any 2 MB-aligned physical address (arch/arm64/kernel/kexec_image.c), which is all the placement we need.