Re: [PATCH] KVM: x86 emulator: fix unlocked CMPXCHG8B emulation.

2010-03-23 Thread Avi Kivity

On 03/21/2010 04:58 PM, Gleb Natapov wrote:


When CMPXCHG8B is executed without LOCK prefix it is racy. Preserve this
behaviour in emulator too.
   


Applied, thanks.

--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] KVM: x86 emulator: fix unlocked CMPXCHG8B emulation.

2010-03-21 Thread Gleb Natapov

When CMPXCHG8B is executed without LOCK prefix it is racy. Preserve this
behaviour in emulator too.

Signed-off-by: Gleb Natapov 
---

This patch goes on top of my previous "KVM: x86 emulator: add decoding
of CMPXCHG8B dst operand." patch.

diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 904351e..e2bbb9c 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -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;
 }
--
Gleb.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html