-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
server: accept CPUID values in instance specs and plumb them to bhyve (…
…#780) Add support for specifying CPUID templates in instance specs. A "template" consists of a CPU vendor and a set of CPUID leaves and associated values. When a client passes an instance spec containing a template, the server runs a `propolis::cpuid::Specializer` over it and applies the resulting values to each vCPU during machine initialization. Add the appropriate sanitization logic to the API-spec-to-internal-spec layer and add migration compatibility checks. This work is supported by some new helper crates and types: - The `propolis_types` crate now has definitions of CPUID leaf identifiers, CPUID values, and supported CPUID vendors. - The `cpuid-utils` crate adds: - Utility functions for querying host CPUID; some of these used to live in the main Propolis lib, but extracting them to a crate makes them available to PHD, where they're useful for writing CPUID tests - Helper impls for converting instance spec CPUID types to leaf/value maps Finally, add two new PHD tests. One simply checks that CPUID values sent to the server properly round-trip back to the client if it asks for the server's instance spec. The other sets up a stripped-down AMD-compatible CPUID configuration with a test-specific brand string in leaves 0x80000002-0x80000004 and verifies that the string is visible in `/proc/cpuinfo`.
- Loading branch information
Showing
30 changed files
with
1,422 additions
and
220 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.