Skip to contentSkip to conversation

KVM: x86 emulator: fix unlocked CMPXCHG8B emulation.

PATCH Applied Gleb Natapov 2 participants 2 messages Mar 21, 2010 – Mar 23, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: x86 emulator: fix unlocked CMPXCHG8B emulation.

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

---

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

arch/x86/kvm/emulate.c +0 -1
index 904351e..e2bbb9c 100644
@@ -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.

Applied
#1 lore raw
Quoted 4 lines · Gleb Natapov

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

Applied, thanks.

Signature · 1 line
error compiling committee.c: too many arguments to function