]> www.infradead.org Git - users/jedix/linux-maple.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Jul 2015 16:49:27 +0000 (09:49 -0700)
commitaa0b8c72f5c1e0208bfafb383b535bdc9d3b2c6b
treeb5fb39f4b64586847c6baa164050ab1d054d20c6
parent9d281572f2be11afa36e1534da43890cb9a130cc
KVM: nSVM: Check for NRIPS support before updating control field

commit f104765b4f81fd74d69e0eb161e89096deade2db upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/svm.c