Repository navigation
Conversation
peikachu
force-pushed
the
fix/riscv-qemu-aia-virtio-config
branch
from
October 28, 2026 07:23
68626dd to
1c10695
Compare
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.
Summary
Align zone1's memory layout in
zone1-linux-virtio.jsonandvirtio-backend.jsonon qemu-aia withzone1-linux.dtsandzone1-linux-passthrough.json:0x83000000/0x0C000000→0x85000000/0x0A0000000x84000000→0x86000000; dtb:0x83000000→0x85000000zone0_ipa/zonex_ipa/sizeupdated to matchMotivation
0x80000000~0x85000000is reserved for OpenSBI and hvisor, so zone0 has no stage-2 mapping for it.hvisor zone startcopies the kernel into this range, which traps into hvisor. hvisor then tries to decode the instruction as MMIO and panics because it is a vector store (trap instruction is not Load or Store, inst 0x02050027). Even without the panic, a kernel at0x84000000would lie outside thememory@85000000node in zone1's dtb.The new layout is the same as
zone1-linux-passthrough.json: dtb at the start of RAM (0x85000000), kernel at0x86000000. This range is inside zone0's RAM, so zone0 can mmap it to load the kernel and serve the virtqueues.Verification
On riscv64/qemu-aia (Linux 6.13 for zone0 and zone1): started zone1 with
zone1-linux-virtio.jsonplus the virtio backend. zone1 booted to a shell, and hvisor reported no ERROR.