Skip to content

integration test: x86: also boot on Cloud Hypervisor; riscv: add for MMIO test#55

Open
phip1611 wants to merge 8 commits intorust-osdev:mainfrom
phip1611:chv
Open

integration test: x86: also boot on Cloud Hypervisor; riscv: add for MMIO test#55
phip1611 wants to merge 8 commits intorust-osdev:mainfrom
phip1611:chv

Conversation

@phip1611
Copy link
Copy Markdown
Member

@phip1611 phip1611 commented Mar 29, 2026

TL;DR:

  • add x86 test run with cloud-hypervisor (more testing scenarious)
  • add riscv test to test on a MMIO-mapped UART 16550

@phip1611 phip1611 changed the title tests: also boot on cloud-hypervisor integration test: x86: also boot on Cloud Hypervisor; riscv: add for MMIO test Mar 29, 2026
@phip1611 phip1611 force-pushed the chv branch 2 times, most recently from 91a0e94 to afb6bd9 Compare March 29, 2026 17:48
@phip1611 phip1611 requested a review from mkroening March 29, 2026 17:49
@phip1611 phip1611 self-assigned this Mar 29, 2026
The old integration test was already x86-specific, but the
layout hid that fact. Put the boot code, linker files, and
runner under integration-test/x86 so later architecture-specific
MMIO work can be added without mixing incompatible assumptions.
Use QEMU’s synthetic "virt" machine together with the generic loader
device to directly load and jump into the kernel ELF, bypassing any
firmware (e.g. OpenSBI/BIOS).

This is the most pragmatic setup for early bring-up as it provides a
well-defined MMIO layout, including a ns16550-compatible UART at a fixed
address, without requiring a full boot chain.

The loader device maps ELF segments into guest RAM and initializes the
CPU's PC to the entry point, allowing us to run in a minimal environment
(M-mode, no SBI) while still having access to a standard MMIO UART for
debug output.
GitHub Actions runners do not expose /dev/kvm, so the x86 Cloud
Hypervisor path cannot be treated as a hard requirement there.
Only run that test when cloud-hypervisor is on PATH and /dev/kvm
exists, and warn clearly otherwise instead of failing the suite.
The integration tests now live under separate x86 and riscv
subdirectories and no longer need Cloud Hypervisor-specific setup
in CI. Point the job at integration-test/, cache the per-target
build directories, and install the QEMU packages needed by both
test paths.
Keep the QEMU and Cloud Hypervisor invocations in the same shell as the rc=$$? capture so failures are reported correctly, and make the shared integration-test toolchain explicitly include the built-in riscv64gc-unknown-none-elf target used by the MMIO guest.
@phip1611 phip1611 removed the request for review from mkroening March 29, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant