]> asedeno.scripts.mit.edu Git - linux.git/commit
KVM: nVMX: support restore of VMX capability MSRs
authorDavid Matlack <dmatlack@google.com>
Wed, 30 Nov 2016 02:14:07 +0000 (18:14 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 8 Dec 2016 14:31:07 +0000 (15:31 +0100)
commit62cc6b9dc61eeedd96c862daa7adc08ff1b2b23b
treeed3dbab2b6d536089ac875bb251daa7807800aab
parent0115f9cbac61918363cbaf26c8521ff9176ccc35
KVM: nVMX: support restore of VMX capability MSRs

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: David Matlack <dmatlack@google.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/include/asm/vmx.h
arch/x86/kvm/vmx.c