Skip to content

Comments

Add unit test for kvm/mshv/whp#1106

Draft
ludfjig wants to merge 1 commit intohyperlight-dev:mainfrom
ludfjig:unit_test_vm
Draft

Add unit test for kvm/mshv/whp#1106
ludfjig wants to merge 1 commit intohyperlight-dev:mainfrom
ludfjig:unit_test_vm

Conversation

@ludfjig
Copy link
Contributor

@ludfjig ludfjig commented Dec 11, 2025

Adds some simple tests which exercise all drivers.

@ludfjig ludfjig added the kind/enhancement For PRs adding features, improving functionality, docs, tests, etc. label Dec 11, 2025
@ludfjig ludfjig force-pushed the unit_test_vm branch 8 times, most recently from ea64f64 to b1ec3e5 Compare December 18, 2025 00:51
@ludfjig ludfjig force-pushed the unit_test_vm branch 2 times, most recently from 2532fce to 94a41e1 Compare February 20, 2026 23:57
@ludfjig ludfjig requested a review from Copilot February 23, 2026 17:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds comprehensive unit tests for the virtual machine abstraction layer that supports KVM, MSHV, and WHP hypervisors. The tests validate register operations (general purpose, FPU, and special registers) and memory mapping functionality across different hypervisor implementations.

Changes:

  • Added a boxed_vm() helper function to create VM instances based on available hypervisor
  • Added unit tests for general purpose registers, FPU registers, special registers, and memory mapping operations
  • Implemented platform-specific workarounds (e.g., KVM's MXCSR handling) and appropriate cfg gates for platform-specific features

Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement For PRs adding features, improving functionality, docs, tests, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant