-
Notifications
You must be signed in to change notification settings - Fork 22
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
lib: emulate Hyper-V enlightenment stack #849
base: master
Are you sure you want to change the base?
Conversation
crates/propolis-api-types/src/instance_spec/components/board.rs
Outdated
Show resolved
Hide resolved
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.
Overall, this looks great to me, and I didn't note any blocking concerns. Left a bunch of minor suggestions, hope they're helpful
crates/propolis-api-types/src/instance_spec/components/board.rs
Outdated
Show resolved
Hide resolved
Thanks for addressing the review feedback, the new changes look good! |
const LOCKED_MASK: u64 = 1 << LOCKED_BIT; | ||
const ENABLED_BIT: u64 = 0; | ||
const ENABLED_MASK: u64 = 1 << ENABLED_BIT; | ||
const GPA_MASK: u64 = !((1 << PAGE_SHIFT) - 1); |
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.
Could use PAGE_MASK
here, or in place of GPA_MASK
all together.
Add the beginnings of a Hyper-V enlightenment stack to complement the bhyve enlightenment stack. This change aims to provide the absolute minimum functionality needed for a hypervisor to claim to expose a Hyper-V-compatible guest-hypervisor interface. These minimum requirements are described in the doc comments throughout this change.
Add PHD tests that boot VMs with the Hyper-V enlightenment stack enabled and (if the guest supports it) that try to query the hypervisor interface from within the guest.
Add a simple
propolis-cli
option to enable the Hyper-V stack. Once the stack has some actual features, this may be better expressed as a table in thepropolis-config-toml
crate, but this gives users a quick and easy way to enable the new interface.Tests: PHD with Debian 11, Ubuntu 22.04, Alpine, and Windows Server 2022 guests; repeated the Debian 11 and WS2022 runs with the Hyper-V enlightenment stack enabled by default for all PHD VMs. Tested with an ad hoc Debian 11 VM, verifying that it detected the Hyper-V hypervisor, that the guest wrote appropriate values to the Hyper-V MSRs, and (through mdb-bhyve) that the correct instruction sequence appears on the guest's hypercall page.
Related to #328.