summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/emulate.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2011-09-13 09:45:38 +0200
committerAvi Kivity <avi@redhat.com>2011-09-25 18:14:58 +0200
commit9be3be1f153e90ea4e1e5b6ed1d72a73d44318d1 (patch)
treed3abe3c1ccbbf46af58b8d737821cef6e80ebd84 /arch/x86/kvm/emulate.c
parentKVM: MMU: fix incorrect return of spte (diff)
downloadlinux-9be3be1f153e90ea4e1e5b6ed1d72a73d44318d1.tar.xz
linux-9be3be1f153e90ea4e1e5b6ed1d72a73d44318d1.zip
KVM: x86 emulator: fix Src2CL decode
Src2CL decode (used for double width shifts) erronously decodes only bit 3 of %rcx, instead of bits 7:0. Fix by decoding %cl in its entirety. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to '')
-rw-r--r--arch/x86/kvm/emulate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 6f08bc940fa8..8b4cc5f067de 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -3603,7 +3603,7 @@ done_prefixes:
break;
case Src2CL:
ctxt->src2.bytes = 1;
- ctxt->src2.val = ctxt->regs[VCPU_REGS_RCX] & 0x8;
+ ctxt->src2.val = ctxt->regs[VCPU_REGS_RCX] & 0xff;
break;
case Src2ImmByte:
rc = decode_imm(ctxt, &ctxt->src2, 1, true);