propolis-server should specify explicit CPUID values for all VMs, even if the spec contained none #835
Labels
server
Related specifically to the Propolis server API and its VM management functions.
Today the
cpuid
field of an instance spec'sBoard
is anOption
:propolis/crates/propolis-api-types/src/instance_spec/components/board.rs
Lines 108 to 112 in 96f1bbd
Specifying
None
gives the VM some sensible defaults for whatever host it happens to be running on. This is useful for running Propolis VMs on non-Oxide hardware (for ad hoc testing, in CI, as part of an Omicron dev cluster on a commodity machine, etc.), where the user may not have a CPUID profile ready to use in advance.propolis-server handles a
None
CPUID value by doing nothing and letting bhyve's CPUID emulation decide what values to supply. However, we're close to needing something a bit more sophisticated:cpuid
field in the instance spec must beSome
The problem is that it's not obvious what values to use in software that might run on arbitrary hardware, like PHD or an Omicron dev cluster. For ad hoc servers, it's possible to work around this by using the
cpuid-gen
utility in the repo to extract host CPUID information to put into a hand-crafted instance spec, but this is at least mildly annoying to do.I propose changing the semantics of
cpuid: None
inpropolis-server
from "use bhyve's legacy emulation" to "extract the values bhyve's legacy emulation would provide and feed them back in as explicit CPUID values"--i.e., do thecpuid-gen
trick, but do it automatically. This would allow PHD to test enlightenments without committing to any particular set of CPUID values in the framework (and without requiring some other way to specify default CPUID values to PHD out-of-band, which just moves the problem back up to whoever is running PHD). It would also make our CI VMs behave more like Omicron production VMs (in the sense that both environments will use the "explicit CPUID" code in bhyve, even though they'll get their CPUID values in different ways).This would be very nice to have before doing #328.
This can be implemented today, but before deploying it widely we should try to land illumos CL 3953 to fix some small gaps between bhyve's legacy and explicit CPUID emulation paths.
The text was updated successfully, but these errors were encountered: