Skip to content

feat(virtio): add VM generation guest driver - #26

Open
appcypher wants to merge 1 commit into
krunfwfrom
appcypher/vm-generation-id
Open

feat(virtio): add VM generation guest driver#26
appcypher wants to merge 1 commit into
krunfwfrom
appcypher/vm-generation-id

Conversation

@appcypher

Copy link
Copy Markdown
Member

TL;DR

Add the built-in guest driver for the VM-generation virtio device introduced by superradcompany/libkrun#123.

Description

  • add a kernel patch for the private VM-generation virtio device
  • synchronously mix each newly published identifier through add_vmfork_randomness() before acknowledging it
  • write the exact processed sequence and identifier back to device config space so the host has an event-driven completion boundary
  • enable the driver in the bundled aarch64, riscv64, x86_64, and Windows x86_64 kernel configurations
  • keep the driver optional for custom kernels while making it built-in for bundled firmware

Test Plan

  • bash -n scripts/apply-kernel-patches.sh
  • Verify CONFIG_VIRTIO_MSB_VMGENID=y in all four bundled kernel configurations
  • Build and boot the patched aarch64 kernel on macOS ARM64/HVF; process two generations and an idempotent retry
  • Build and boot the patched x86_64 kernel on Linux KVM; process two generations and an idempotent retry

Add a built-in driver for the Microsandbox VM generation device. Process host requests through add_vmfork_randomness and publish the exact sequence and identifier only after the kernel callback completes.

Handle coalesced config changes through a work item, reject stale or inconsistent sequences, and enable the driver in the bundled x86_64, aarch64, RISC-V, and Windows-hosted guest configurations.
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