KVM: x86 emulator: fix unlocked CMPXCHG8B emulation
authorGleb Natapov <gleb@redhat.com>
Sun, 21 Mar 2010 14:58:36 +0000 (16:58 +0200)
committerAvi Kivity <avi@redhat.com>
Mon, 17 May 2010 09:16:38 +0000 (12:16 +0300)
When CMPXCHG8B is executed without LOCK prefix it is racy. Preserve this
behaviour in emulator too.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/emulate.c

index b8ce538..64c9854 100644 (file)
@@ -1724,7 +1724,6 @@ static inline int emulate_grp9(struct x86_emulate_ctxt *ctxt,
                       (u32) c->regs[VCPU_REGS_RBX];
 
                ctxt->eflags |= EFLG_ZF;
-               c->lock_prefix = 1;
        }
        return X86EMUL_CONTINUE;
 }