Skip to content

Commit

Permalink
KVM: Remove dead code in the cmpxchg instruction emulation
Browse files Browse the repository at this point in the history
The writeback fixes (02c03a3) let
some dead code in the cmpxchg instruction emulation. Remove it.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Avi Kivity <avi@qumranet.com>
  • Loading branch information
Aurelien Jarno authored and Avi Kivity committed Oct 13, 2007
1 parent 62b3ffb commit 3ccb882
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/kvm/x86_emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1278,8 +1278,6 @@ x86_emulate_memop(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
src.orig_val = src.val;
src.val = _regs[VCPU_REGS_RAX];
emulate_2op_SrcV("cmp", src, dst, _eflags);
/* Always write back. The question is: where to? */
d |= Mov;
if (_eflags & EFLG_ZF) {
/* Success: write back to memory. */
dst.val = src.orig_val;
Expand Down

0 comments on commit 3ccb882

Please sign in to comment.