-
Notifications
You must be signed in to change notification settings - Fork 155
Trim Hypervisor trait
#924
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
ludfjig
wants to merge
4
commits into
hyperlight-dev:main
Choose a base branch
from
ludfjig:vm_trait_new
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81f0d54 to
62fad87
Compare
1562f26 to
edc7f00
Compare
f6337f9 to
350b8e0
Compare
jsturtevant
reviewed
Nov 7, 2025
fa21515 to
0a033d6
Compare
0a033d6 to
5a116e5
Compare
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
trait Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
5a116e5 to
ee7545e
Compare
ludfjig
commented
Nov 26, 2025
| } | ||
|
|
||
| #[cfg(test)] | ||
| mod tests { |
Contributor
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed these tests are removed (on purpose). Turns out it does not even run the CODE below... I am planning on re-adding some unit tests in next PR
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
c07d874 to
11db597
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR
Hypervisortrait. It's now a minimal trait for common functionality of a minimal Vm. It abstracts over differences in kvm, mshv, whp. This traits only knows things like set/get registers, run, but nothing about guest functions or hyperlight specifics.HyperlightVmstruct. This is a new struct that contains thedyn Hypervisorabove, as well as things like guest_ptr, rsp, memory-regions, gdb connections, etc. HyperlightVm knows about initialization, dispatching guest calls, gdb-debugging etc, guest-tracing, whichHypervisortrait doesn't. All code that was previously duplicated in kvm/mshv/whp now lives in HyperlightVm.When reviewing, new file hyperlight_vm.rs should be compared against old kvm.rs, hyperv_linux.rs, hyperv_windows.rs. Note: this PR should not modify/introduce new code (as best as possible). It primarily just moves code around and factors out duplicate code.
Closes #465, #904