Skip to content

FreeBSD VM tests#646

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

FreeBSD VM tests#646
nohajc wants to merge 9 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 and others added 4 commits April 21, 2026 23:07
Signed-off-by: Jan Noha <nohajc@gmail.com>
- fixed broken init rule
- fixed FreeBSD base image URL for x86_64 and arm64

Signed-off-by: Jan Noha <nohajc@gmail.com>
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>
@nohajc nohajc force-pushed the freebsd-tests-ready branch from 2a7b08c to 8c68f95 Compare April 21, 2026 22:09
nohajc added 3 commits April 22, 2026 00:30
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 01bd005 to a5e37f8 Compare April 21, 2026 22:30
nohajc added 2 commits April 22, 2026 01:03
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 a5e37f8 to 0e77561 Compare April 21, 2026 23:07
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