]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: nSVM: Check for NRIPS support before updating control field
authorBandan Das <bsd@redhat.com>
Thu, 11 Jun 2015 06:05:33 +0000 (02:05 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 19 Jun 2015 15:16:26 +0000 (17:16 +0200)
commit07e1317e97a260b4c9fd672bb32467c34e19ee63
tree25e36bd9849498c5a939277cd6d31176bf525203
parent199f92efc33db0f64a213b1ee07256c345df600d
KVM: nSVM: Check for NRIPS support before updating control field

If hardware doesn't support DecodeAssist - a feature that provides
more information about the intercept in the VMCB, KVM decodes the
instruction and then updates the next_rip vmcb control field.
However, NRIP support itself depends on cpuid Fn8000_000A_EDX[NRIPS].
Since skip_emulated_instruction() doesn't verify nrip support
before accepting control.next_rip as valid, avoid writing this
field if support isn't present.

Signed-off-by: Bandan Das <bsd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm.c