]> git.kernelconcepts.de Git - karo-tx-linux.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)
commitb96fb439774e1bfb7d027ad324fa48606167cb52
tree58e3ba4e92cb0e59065aa75423f44937c213ea8d
parent7313c698050387a11c21afb0c6b4c61f21f7c042
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