]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: nVMX: fixes to nested virt interrupt injection
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 27 Jul 2017 10:29:32 +0000 (12:29 +0200)
committerRadim Krčmář <rkrcmar@redhat.com>
Tue, 1 Aug 2017 20:24:17 +0000 (22:24 +0200)
commite678828d1462024a1e4f11af92dc57777e117cc8
tree58e3ba4e92cb0e59065aa75423f44937c213ea8d
parente683c07e5d232f880be3f180b4e79f3f40719982
KVM: nVMX: fixes to nested virt interrupt injection

There are three issues in nested_vmx_check_exception:

1) it is not taking PFEC_MATCH/PFEC_MASK into account, as reported
by Wanpeng Li;

2) it should rebuild the interruption info and exit qualification fields
from scratch, as reported by Jim Mattson, because the values from the
L2->L0 vmexit may be invalid (e.g. if an emulated instruction causes
a page fault, the EPT misconfig's exit qualification is incorrect).

3) CR2 and DR6 should not be written for exception intercept vmexits
(CR2 only for AMD).

This patch fixes the first two and adds a comment about the last,
outlining the fix.

Cc: Jim Mattson <jmattson@google.com>
Cc: Wanpeng Li <wanpeng.li@hotmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm.c
arch/x86/kvm/vmx.c