mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
When applying a CPU profile we need a way to change the configuration of each vCPU to respect the requirements of the CPU profile. This means that we need to set the feature MSRs in accordance with the CPU profile upon configuring the vCPU and also ensuring that we do not attempt to restore any MSRs that are not compatible with the profile upon snapshot/restore. The first step is to update `Vm::create_vcpu` to take an extra parameter describing the necessary update. In the case of KVM we modify the internal MSR state buffer when constructing the vCPU whenever a VcpuMsrConfigUpdate is present. The feature MSRs contained in the configuration will be treated in follow up commits. The changes to the vmm crate that are part of this commit are just the minimum necessary to make the crate compile. We will update the vmm crate to take CPU profiles into account in a follow up commit. Signed-off-by: Oliver Anderson <oliver.anderson@cyberus-technology.de> On-behalf-of: SAP oliver.anderson@sap.com