kvm: vmx: handle invvpid vm exit gracefully
authorPetr Matousek <pmatouse@redhat.com>
Tue, 23 Sep 2014 18:22:30 +0000 (20:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Feb 2015 06:48:18 +0000 (14:48 +0800)
commitf9e5b0ded4be49805adcceff46c1f44137773b24
treebc6abfd28d82551332548d882b6b030263d9761f
parent677616e3ecaa43e77a81e36aa162d32bdba01476
kvm: vmx: handle invvpid vm exit gracefully

commit a642fc305053cc1c6e47e4f4df327895747ab485 upstream.

On systems with invvpid instruction support (corresponding bit in
IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid
causes vm exit, which is currently not handled and results in
propagation of unknown exit to userspace.

Fix this by installing an invvpid vm exit handler.

This is CVE-2014-3646.

Cc: stable@vger.kernel.org
Signed-off-by: Petr Matousek <pmatouse@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
[wangkai: Backport to 3.10: adjust context]
Signed-off-by: Wang Kai <morgan.wang@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/include/uapi/asm/vmx.h
arch/x86/kvm/vmx.c