KVM: x86: reset MMU on KVM_SET_VCPU_EVENTS
authorXiao Guangrong <guangrong.xiao@linux.intel.com>
Sat, 24 Dec 2016 09:00:42 +0000 (10:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2017 10:39:08 +0000 (11:39 +0100)
commitf39969ab0418a9ef7da3f6e571359449b3497d83
tree4da64ded2d1ebafb2b50fcdea7c61f765474d092
parentfe4fc2d67d0bfa0a1b5178e4f3c0f3ae7b29f737
KVM: x86: reset MMU on KVM_SET_VCPU_EVENTS

commit 6ef4e07ecd2db21025c446327ecf34414366498b upstream.

Otherwise, mismatch between the smm bit in hflags and the MMU role
can cause a NULL pointer dereference.

Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/x86.c