]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Avoid emulating instructions on #UD mistakenly
authorNadav Amit <namit@cs.technion.ac.il>
Wed, 13 Aug 2014 13:50:13 +0000 (16:50 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 19 Aug 2014 13:12:28 +0000 (15:12 +0200)
commitee486342b1706e6d8c3b78b0de09fef721982b57
tree4725c419f4a5cfe54f20e9f0d80ea3efa6476c34
parent245093a702c4ff34c047f358fd6937d4360c20d1
KVM: x86: Avoid emulating instructions on #UD mistakenly

Commit 99e6012a29 mistakenly caused instructions which are not marked as
EmulateOnUD to be emulated upon #UD exception. The commit caused the check of
whether the instruction flags include EmulateOnUD to never be evaluated. As a
result instructions whose emulation is broken may be emulated.  This fix moves
the evaluation of EmulateOnUD so it would be evaluated.

Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
[Tweak operand order in &&, remove EmulateOnUD where it's now superfluous.
 - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/emulate.c