kvm: vmx: handle invvpid vm exit gracefully
authorPetr Matousek <pmatouse@redhat.com>
Tue, 23 Sep 2014 18:22:30 +0000 (20:22 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 5 Nov 2014 20:27:47 +0000 (20:27 +0000)
commit3f09b1f1033b9a6350b72649c6abdafdf81e5c2d
tree35267d2c67f03f31729fd9a567e5c42d9da6f73b
parent02a988e6e4511b1f6d83525710a12db9c5a45149
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>
[bwh: Backported to 3.2:
 - Adjust filename
 - Drop inapplicable change to exit reason string array]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/x86/include/asm/vmx.h
arch/x86/kvm/vmx.c