KVM: x86: Fix wrong masking on relative jump/call
authorNadav Amit <namit@cs.technion.ac.il>
Thu, 18 Sep 2014 19:39:37 +0000 (22:39 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Nov 2014 16:59:55 +0000 (08:59 -0800)
commit9cbba3890c81368ba739ebf2468767e5a306d489
tree5c482ef2a2be5711acc49dd99cedad81b5c6add3
parent76b73a19275a8eea9e460f348bf14b65d90ca6fd
KVM: x86: Fix wrong masking on relative jump/call

commit 05c83ec9b73c8124555b706f6af777b10adf0862 upstream.

Relative jumps and calls do the masking according to the operand size, and not
according to the address size as the KVM emulator does today.

This patch fixes KVM behavior.

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