Skip to content

FreeBSD VM tests#646

Draft
nohajc wants to merge 15 commits intocontainers:mainfrom
nohajc:freebsd-tests-ready
Draft

FreeBSD VM tests#646
nohajc wants to merge 15 commits intocontainers:mainfrom
nohajc:freebsd-tests-ready

Conversation

@nohajc
Copy link
Copy Markdown
Contributor

@nohajc nohajc commented Apr 21, 2026

Adds three new integration test cases:

  1. Boot FreeBSD VM and print OK
  2. Test FreeBSD TCP client
  3. Test FreeBSD TCP server

Adds PVH boot protocol support (based on #284) to enable FreeBSD boot on x86_64.

Direct kernel boot works

  • on macOS and Linux aarch64 with the raw boot image and generic kernel configuration
  • on Linux x86_64 with ELF PVH image and the Firecracker kernel configuration

@nohajc nohajc force-pushed the freebsd-tests-ready branch 3 times, most recently from a5e37f8 to 0e77561 Compare April 21, 2026 23:07
@nohajc nohajc force-pushed the freebsd-tests-ready branch 4 times, most recently from e78922d to b766f11 Compare April 29, 2026 17:03
nohajc and others added 8 commits April 29, 2026 19:04
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: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Jan Noha <nohajc@gmail.com>
Signed-off-by: Jan Noha <nohajc@gmail.com>
Signed-off-by: Jan Noha <nohajc@gmail.com>
Signed-off-by: Jan Noha <nohajc@gmail.com>
Signed-off-by: Jan Noha <nohajc@gmail.com>
Signed-off-by: Jan Noha <nohajc@gmail.com>
Signed-off-by: Jan Noha <nohajc@gmail.com>
Signed-off-by: Jan Noha <nohajc@gmail.com>
@nohajc nohajc force-pushed the freebsd-tests-ready branch from b766f11 to 040fcb0 Compare April 29, 2026 17:05
nohajc added 7 commits April 29, 2026 22:14
Signed-off-by: Jan Noha <nohajc@gmail.com>
Signed-off-by: Jan Noha <nohajc@gmail.com>
Signed-off-by: Jan Noha <nohajc@gmail.com>
Signed-off-by: Jan Noha <nohajc@gmail.com>
Signed-off-by: Jan Noha <nohajc@gmail.com>
Signed-off-by: Jan Noha <nohajc@gmail.com>
Signed-off-by: Jan Noha <nohajc@gmail.com>
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