Add support for PVH boot protocol; FreeBSD VM tests#646
Open
nohajc wants to merge 6 commits into
Open
Conversation
a5e37f8 to
0e77561
Compare
a2f25a4 to
2165985
Compare
Implement PVH (Para-Virtualized Hardware) boot protocol support, enabling FreeBSD x86_64 kernels to boot via the Xen PVH ABI. Key changes: - arch/Cargo.toml: add linux-loader (elf feature) as x86_64 dep - layout.rs: add PVH_INFO_START, MODLIST_START, MEMMAP_START, RSDP_ADDR - mptable.rs: export MPTABLE_START as pub - gdt.rs: fix get_limit() to apply granularity (G) bit expansion - mod.rs: add configure_pvh(), add_memmap_entry(); refactor configure_system() to dispatch to configure_pvh() or configure_64bit_boot() based on pvh flag; add pvh param - regs.rs: add pvh param to setup_regs/setup_sregs/ configure_segments_and_sregs; set 32-bit protected mode GDT and CR0=PE|ET for PVH; set rbx=PVH_INFO_START per PVH ABI - vstate.rs: thread pvh through configure_x86_64() - builder.rs: detect PvhEntryPresent in ELF load result; propagate pvh through PayloadConfig, load_payload, create_vcpus_x86_64 - lib.rs: add pvh param to Vmm::configure_system() Co-authored-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Jan Noha <nohajc@gmail.com>
d29252f to
711b0b0
Compare
- simple boot test, gvproxy connect and listen tests - fix timing issue in all network listen tests - replace the macOS-only `cfg` gate with a `gvproxy -version` check Signed-off-by: Jan Noha <nohajc@gmail.com>
- have to install lld and also clang on the self-hosted runner Signed-off-by: Jan Noha <nohajc@gmail.com>
Signed-off-by: Jan Noha <nohajc@gmail.com>
Signed-off-by: Jan Noha <nohajc@gmail.com>
711b0b0 to
a3bf760
Compare
…the definition Signed-off-by: Jan Noha <nohajc@gmail.com>
a3bf760 to
b801ff5
Compare
Contributor
Author
|
Ready for review. |
Contributor
Author
|
Gonna make adjustments based on the new contribution guidelines. Mainly need to fix "co-authored by" for AI assistants. |
mtjhrc
reviewed
May 11, 2026
Comment on lines
+69
to
+72
| TestOutcome::Fail(format!( | ||
| "expected exactly {:?}, got {:?}", | ||
| "OK\n", output_str | ||
| )) |
Collaborator
There was a problem hiding this comment.
The file test_freebsd_gvproxy_tcp_guest_connect.rs was introduced as part of this PR. Please squash this formatting fix into the appropriate commit tests: add FreeBSD guest support in this case.
Collaborator
|
Thanks for working on this! I'll take a more detailed look later. Also note, that I changed the PR title, because this not only adds the tests but implements/revives the PVH boot support. |
Contributor
Author
|
Makes sense. PVH is the enabler for the full test suite to cover all architectures but I wasn't sure at first if I can make it work. |
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.
Adds three new integration test cases:
Adds PVH boot protocol support (based on #284) to enable FreeBSD boot on x86_64.
Direct kernel boot works
Gvproxy with vfkit enabled on Linux via containers/gvisor-tap-vsock@c09fb7d