Skip to content

Support Asterinas as an x86 hvisor guest#355

Open
dsadsasdaddas wants to merge 1 commit into
syswonder:devfrom
dsadsasdaddas:wangyue/asterinas-zone-support
Open

Support Asterinas as an x86 hvisor guest#355
dsadsasdaddas wants to merge 1 commit into
syswonder:devfrom
dsadsasdaddas:wangyue/asterinas-zone-support

Conversation

@dsadsasdaddas

Copy link
Copy Markdown

Summary

Add the x86 hvisor side needed to boot Asterinas as a non-root zone guest on QEMU:

  • add an Asterinas zone1 configuration and matching virtio-mmio device configuration
  • expose CPUID leaf 0x15 from the hvisor TSC frequency so guests can avoid PIT-based TSC calibration
  • translate non-root virtual I/O APIC destinations from guest-local APIC IDs to the zone CPU set, fixing virtio completion interrupts for guests that program local APIC IDs

Validation

  • cargo fmt --check
  • make ARCH=x86_64 BOARD=qemu MODE=release with /home/wzu/.local/bin removed from PATH so Rust uses /usr/bin/cc instead of the local cc tmux wrapper
  • Booted Asterinas under hvisor using the prepared QEMU/root-zone setup. The latest log is /home/wzu/Desktop/wangyue/logs/hvisor-asterinas-autostart.log and includes:
    • Entering the Asterinas: 1
    • OSTD initialized: 1
    • Found MMIO device: 3
    • spawn the virtio-block thread: 1
    • Handle Request: 37
    • block device handle IRQ: 37
    • All components initialization in Process stage completed: 1
    • SYS_MOUNT: 6
    • panic: 0
    • ERROR: 0

Signed-off-by: dsadsasdaddas wangyue20060908@gmail.com

@github-actions github-actions Bot added the x86_64 label Jul 3, 2026
Signed-off-by: dsadsasdaddas <wangyue20060908@gmail.com>
(cherry picked from commit 7cf1c73)
@dsadsasdaddas dsadsasdaddas force-pushed the wangyue/asterinas-zone-support branch from 7cf1c73 to c580771 Compare July 3, 2026 12:20
@dsadsasdaddas dsadsasdaddas marked this pull request as ready for review July 3, 2026 13:30
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.

1 participant