mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
We introduce a method on the CpuProfile enum that computes the required MSR related updates in order to be compatible with the CPU profile. The output of this function describes the feature MSRs that need to be set and the snapshottable MSRs that are compatible with the chosen CPU profile. The former provides the guest information about CPU features (that are not obtainable from inspecting CPUID) while the latter is used to ensure that MSRs that are incompatible with the CPU profile are not set upon snapshot/restore. These will be utilized in the vmm crate in a follow up commit. We expect the hypervisor to take care of checking compatibility of the feature MSRs when they are set. IA32_ARCH_CAPABILITIES is a known exception however which we introduce our own checks for in a follow up commit. Signed-off-by: Oliver Anderson <oliver.anderson@cyberus-technology.de> On-behalf-of: SAP oliver.anderson@sap.com