KVM: nVMX: Leave VMX mode on clearing of feature control MSR
authorJan Kiszka <jan.kiszka@siemens.com>
Sat, 4 Jan 2014 17:47:19 +0000 (18:47 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 17 Jan 2014 09:22:13 +0000 (10:22 +0100)
commit42124925c1f580068661bebd963d7c102175a8a9
tree2176bdb36a414e2f3feb06d686bdb8d18b203f7b
parent8246bf52c75aa9b9b336a84f31ed2248754d0f71
KVM: nVMX: Leave VMX mode on clearing of feature control MSR

When userspace sets MSR_IA32_FEATURE_CONTROL to 0, make sure we leave
root and non-root mode, fully disabling VMX. The register state of the
VCPU is undefined after this step, so userspace has to set it to a
proper state afterward.

This enables to reboot a VM while it is running some hypervisor code.

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