mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
Feature MSRs must have consistent values across snapshot and restore, otherwise we risk subtle time of check to time of use errors. We thus adapt `Vcpu::set_state` to return a hard error if any feature MSR cannot be restored. It is enough to check that each MSR failing to be set does not have an address corresponding to any of the feature MSRs stored in the `KvmVcpu`. This is because the `msrs` in the `VcpuKvmState` contain all the feature MSRs required by the selected CPU profile by construction. Signed-off-by: Oliver Anderson <oliver.anderson@cyberus-technology.de> On-behalf-of: SAP oliver.anderson@sap.com