• David Matlack's avatar
    KVM: nVMX: support restore of VMX capability MSRs · 62cc6b9d
    David Matlack authored
    The VMX capability MSRs advertise the set of features the KVM virtual
    CPU can support. This set of features varies across different host CPUs
    and KVM versions. This patch aims to addresses both sources of
    differences, allowing VMs to be migrated across CPUs and KVM versions
    without guest-visible changes to these MSRs. Note that cross-KVM-
    version migration is only supported from this point forward.
    
    When the VMX capability MSRs are restored, they are audited to check
    that the set of features advertised are a subset of what KVM and the
    CPU support.
    
    Since the VMX capability MSRs are read-only, they do not need to be on
    the default MSR save/restore lists. The userspace hypervisor can set
    the values of these MSRs or read them from KVM at VCPU creation time,
    and restore the same value after every save/restore.
    Signed-off-by: default avatarDavid Matlack <dmatlack@google.com>
    Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
    62cc6b9d
vmx.c 326 KB