integration test: x86: also boot on Cloud Hypervisor; riscv: add for MMIO test#55
Open
phip1611 wants to merge 8 commits intorust-osdev:mainfrom
Open
integration test: x86: also boot on Cloud Hypervisor; riscv: add for MMIO test#55phip1611 wants to merge 8 commits intorust-osdev:mainfrom
phip1611 wants to merge 8 commits intorust-osdev:mainfrom
Conversation
91a0e94 to
afb6bd9
Compare
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR: