]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: emulation of dword cmov on long-mode should clear [63:32]
authorNadav Amit <namit@cs.technion.ac.il>
Sun, 15 Jun 2014 13:13:00 +0000 (16:13 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 19 Jun 2014 10:52:10 +0000 (12:52 +0200)
commitbbf44498a12c195926b8f9bf6ecf1660b7f66f2b
tree804730300e75d1574caacd63a89fee2c0896894e
parent3954775dec920333d7e72330012075f6b7c4c510
KVM: x86: emulation of dword cmov on long-mode should clear [63:32]

Even if the condition of cmov is not satisfied, bits[63:32] should be cleared.
This is clearly stated in Intel's CMOVcc documentation.  The solution is to
reassign the destination onto itself if the condition is unsatisfied.  For that
matter the original destination value needs to be read.

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