kvm: x86: Separately write feature control MSR on reset
commit6bdf863d942a267f984e4bd82be80cb2ac5b9915
authorJan Kiszka <jan.kiszka@siemens.com>
Tue, 17 Dec 2013 19:05:13 +0000 (17 20:05 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 18 Dec 2013 09:13:18 +0000 (18 10:13 +0100)
tree3d9f560d130c1e8bffbf621d09bdf95aa4194691
parenta94b36ddd6af28593c8a5171b5100e6c3dfc063e
kvm: x86: Separately write feature control MSR on reset

If the guest is running in nested mode on system reset, clearing the
feature MSR signals the kernel to leave this mode. Recent kernels
processes this properly, but leave the VCPU state undefined behind. It
is the job of userspace to bring it to a proper shape. Therefore, write
this specific MSR first so that no state transfer gets lost.

This allows to cleanly reset a guest with VMX in use.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target-i386/kvm.c