cloud-hypervisor/hypervisor/src/kvm
Sebastien Boeuf 0f1ab38ded hypervisor: kvm: Make MSRs set/get more flexible
Based on the way KVM_GET_MSRS and KVM_SET_MSRS work, both function are
very unlikely to fail, as they simply stop looping through the list of
MSRs as soon as getting or setting one fails. This is causing some
issues with the snapshot/restore feature, as on some platforms, we only
save a subset of the list of MSRs, leading to unproper way of saving the
VM.

The way to address this issue is by checking the number of MSRs get/set
matches the expected amount from the list. In case it does not match, we
simply ignore the failing MSR and continue getting/setting the rest of
the list. By doing this by iterations, we end up getting/setting as many
MSRs as the platform can support.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2020-08-05 14:52:35 +01:00
..
aarch64 vmm: hypervisor: fix white space issues 2020-06-29 21:51:59 +01:00
x86_64 arch, hypervisor, vmm: Patch CPUID subleaves to expose EPC sections 2020-07-15 15:08:56 +02:00
mod.rs hypervisor: kvm: Make MSRs set/get more flexible 2020-08-05 14:52:35 +01:00