Skip to content

Add unit test for kvm/mshv/whp - #1106

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

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

Conversation

@ludfjig

@ludfjig ludfjig commented Dec 11, 2025

Copy link
Copy Markdown
Contributor

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 比较 December 18, 2025 00:51
@ludfjig
ludfjig force-pushed the unit_test_vm branch 2 times, most recently from 2532fce to 94a41e1 比较 February 20, 2026 23:57
@ludfjig
ludfjig requested a review from Copilot February 23, 2026 17:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread src/hyperlight_host/src/hypervisor/virtual_machine/mod.rs Outdated
Comment thread src/hyperlight_host/src/hypervisor/virtual_machine/mod.rs Outdated
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
注册 for free to join this conversation on GitHub. Already have an account? 登录 to comment

标签

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

项目

None yet

Development

Successfully merging this pull request may close these issues.

2 participants