]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: POP [ESP] is not emulated correctly
authorNadav Amit <namit@cs.technion.ac.il>
Thu, 25 Dec 2014 00:52:21 +0000 (02:52 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 8 Jan 2015 21:48:07 +0000 (22:48 +0100)
commitadc758d5201d30183d743e470ecd78d871043c02
treea11bd04a1019decdab48396f949a17e39a06e8b1
parent1b55c5a807b286a4a0de15a23c5eb40384b90b51
KVM: x86: POP [ESP] is not emulated correctly

According to Intel SDM: "If the ESP register is used as a base register for
addressing a destination operand in memory, the POP instruction computes the
effective address of the operand after it increments the ESP register."

The current emulation does not behave so. The fix required to waste another
of the precious instruction flags and to check the flag in decode_modrm.

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