Skip to content

x86_64/qemu: add an Asterinas root-zone boot mode#341

Closed
tiniham wants to merge 10 commits into
syswonder:devfrom
tiniham:feature/x86-asterinas-guest
Closed

x86_64/qemu: add an Asterinas root-zone boot mode#341
tiniham wants to merge 10 commits into
syswonder:devfrom
tiniham:feature/x86-asterinas-guest

Conversation

@tiniham

@tiniham tiniham commented Jul 2, 2026

Copy link
Copy Markdown

This adds a way to boot Asterinas instead of Linux as the root zone on the
existing qemu board, plus a small package of guest-side probes used to
sanity-check scheduling/IPI/timer behavior once it was up.

  • board.rs / platform.mk: new aster_guest toggle. When set, selects
    the Asterinas kernel cmdline, a CPIO initramfs, and adds the
    corresponding GRUB entry. Off by default.
  • platform/x86_64/qemu/asterinas/: the probe package — smp_probe,
    ipi_pingpong, timer_jitter, ctxsw, plus the scripts that build/run
    them and a self-test init used by run_asterinas.sh to confirm the guest
    actually came up cleanly rather than just "QEMU didn't crash."
  • Kconfig registration for aster_guest, a CHANGELOG line.

This only really works correctly once the four fixes opened separately in
this queue land — LA57 MMIO decoding, the CPUID/TSC caching, the multiboot
copy-ordering fix, and the q35 PCI window correction all get exercised by
bringing this guest up. They're split out because each stands on its own,
but this PR's diff includes them too since it can't honestly be claimed to
boot without them. Happy to shrink this down once those merge.

Booted this end-to-end under QEMU/KVM three separate times to make sure it
wasn't a fluke: reaches a working BusyBox shell every time, the self-check
reports correct uname/cpu-count/meminfo/rootfs, and prints
asterinas-on-hvisor-ok at the end. Build and format checks clean both
with the toggle on and off.

tiniham added 9 commits June 13, 2026 20:18
dev moved to Kconfig-based board config while this branch was open. Rebased
and carried aster_guest forward as a proper Kconfig entry (kconfig/Kconfig +
cfg_map.toml) instead of a bare Cargo feature, and pointed run_asterinas.sh
at the new "make defconfig" + .config flow since the old FEATURES= build
argument no longer exists upstream.

No functional changes; qemu/asterinas boot flow re-verified after the
rebase.
@github-actions github-actions Bot added the x86_64 label Jul 2, 2026
@tiniham tiniham force-pushed the feature/x86-asterinas-guest branch from 6c97092 to 595fef2 Compare July 2, 2026 15:43
@tiniham tiniham force-pushed the feature/x86-asterinas-guest branch from 595fef2 to fe03bf2 Compare July 2, 2026 16:42
@Solicey Solicey closed this Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants