fix(starry): route app qemu through dynamic boot#1267
Merged
Conversation
65 tasks
Contributor
There was a problem hiding this comment.
审查总结
PR 变更内容:将 Context::qemu() 中的 apply_x86_64_kvm_accel_if_available() 调用替换为 apply_dynamic_platform_qemu_boot(),并删除已无调用方的包装函数。
实现逻辑:旧函数仅在 x86_64 上添加 -accel kvm,不包含 UEFI 引导、BIN 转换等 dynamic 平台 QEMU 启动所需的修正。apply_dynamic_platform_qemu_boot() 已在 arceos、starry test、axvisor 等所有其他 QEMU 启动路径中使用,本 PR 将遗漏的 Context::qemu() app-qemu 路径对齐到已有统一逻辑,修复了裸 ELF + PVH 失败问题。
本地验证:
cargo fmt --check:通过cargo clippy --manifest-path scripts/axbuild/Cargo.toml --all-features -- -D warnings:通过,无警告
CI 状态:
Detect changed paths/Cancel stale CI runs:successCheck formatting (run_host/run_container)、Run sync-lint (run_host/run_container):正在运行或已完成(PR 仅改scripts/axbuild/脚本代码)- 各 test 矩阵 (starry/arceos/axvisor qemu, self-hosted board 等):skipped — 这是预期的 CI 路径过滤行为,因为
scripts/axbuild/变更不触发 QEMU 测试工作流 - 无 PR 相关的 CI 失败
重复/重叠分析:
- 无其他 open PR 涉及
Context::qemu()路径或apply_x86_64_kvm_accel_if_available→apply_dynamic_platform_qemu_boot迁移 - PR #1038(nginx 测试)是发现此 bug 的来源,非重复 PR
- PR #1266(Wi-Fi 模式切换)、PR #1265(USB 修复)与此 PR 作用域完全不重叠
审查历史:无先前审查评论或未解决的 review thread。
修复覆盖:本 PR 修复 QEMU 启动配置路径而非运行时行为,不适合单元测试。被调用的 apply_dynamic_platform_qemu_boot() 已有大量 _with_probe 测试覆盖。PR 作者验证了 cargo xtask starry app qemu -t redis --arch x86_64 已切换为 OVMF + pflash 启动路径。
结论:变更正确、最小化且与项目现有模式一致,无阻塞问题。
Powered by mimo-v2.5-pro
Merged
fzg-23
pushed a commit
to fzg-23/tgoskits
that referenced
this pull request
Jun 16, 2026
luodeb
pushed a commit
that referenced
this pull request
Jun 30, 2026
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.
背景
Starry app 的
qemu路径在 x86_64 上会直接把 dynamic 平台内核以-kernel <ELF>方式交给 QEMU。当前生成的 ELF 不包含 PVH ELF Note,因此会在启动阶段失败:在 starry apps 测试中发现 #1038。该问题不属于 nginx 测试业务本身,而是
scripts/axbuild的 app-qemu 派发路径没有复用 dynamic platform boot 逻辑。修改内容
scripts/axbuild/src/context/mod.rs中,将Context::qemu()的 x86 KVM 预处理替换为apply_dynamic_platform_qemu_boot()。scripts/axbuild/src/test/qemu.rs中已无调用方的apply_x86_64_kvm_accel_if_available()包装函数。原因
apply_dynamic_platform_qemu_boot()已经封装了 dynamic 平台所需的 QEMU 修正:uefi=trueto_bin=true这和
arceos/starry test等既有路径保持一致。把它补到Context::qemu()后,starry app qemu会自动走已验证的 UEFI/BIN 启动路径,而不是继续触发裸 ELF + PVH 失败。验证
cargo fmt --allcargo xtask clippy --package axbuildcargo xtask starry app qemu -t redis --arch x86_64验证结果显示 x86_64 app-qemu 已切换为 OVMF + pflash +
starryos.esp,不再使用裸-kernel直启。影响范围
starry app qemu这条原先漏掉的 dynamic boot 路径。apply_dynamic_platform_qemu_boot()的 ArceOS / Starry test 路径。