FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

arm64: KEXEC_TYPE_MULTIKERNEL Image loader, placement in the grant, PoC cleaning · Issue #12 · multikernel/linux · GitHub

forked from torvalds/linux

arm64: KEXEC_TYPE_MULTIKERNEL Image loader, placement in the grant, PoC cleaning #12

Description

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.

Activity

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


      Back | FazBrowse Home | New Git URL