kvm: vmx: handle invvpid vm exit gracefully
authorPetr Matousek <pmatouse@redhat.com>
Tue, 23 Sep 2014 18:22:30 +0000 (20:22 +0200)
committerZefan Li <lizefan@huawei.com>
Mon, 2 Feb 2015 09:04:59 +0000 (17:04 +0800)
commit19016101fc9260be9d2f6f2def34f56b29afaa7e
tree656d809ee11cf30c7bd9024172d782bccb20c584
parent291fd081a444af428d3b3ccca15aede242827c6f
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.

Signed-off-by: Petr Matousek <pmatouse@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
[lizf: Backported to 3.4:
 - adjust filename
 - drop the change to VMX_EXIT_REASON strings]
Signed-off-by: Zefan Li <lizefan@huawei.com>
arch/x86/include/asm/vmx.h
arch/x86/kvm/vmx.c