]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: ARPL emulation can cause spurious exceptions
authorNadav Amit <namit@cs.technion.ac.il>
Mon, 26 Jan 2015 07:32:24 +0000 (09:32 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 26 Jan 2015 11:14:49 +0000 (12:14 +0100)
commit3653f53594934a2177edf7b0657b9699034024aa
tree6287c2874c42cc29984d6b8807ccb06e5023c0a5
parent6033f6d6b8d2b73391fe943ab236d2dc357cfc3d
KVM: x86: ARPL emulation can cause spurious exceptions

ARPL and MOVSXD are encoded the same and their execution depends on the
execution mode.  The operand sizes of each instruction are different.
Currently, ARPL is detected too late, after the decoding was already done, and
therefore may result in spurious exception (instead of failed emulation).

Introduce a group to the emulator to handle instructions according to execution
mode (32/64 bits). Note: in order not to make changes that may affect
performance, the new ModeDual can only be applied to instructions with ModRM.

Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/emulate.c