KVM: Remove dead code in the cmpxchg instruction emulation
authorAurelien Jarno <aurelien@aurel32.net>
Wed, 25 Jul 2007 09:41:57 +0000 (11:41 +0200)
committerAvi Kivity <avi@qumranet.com>
Sat, 13 Oct 2007 08:18:19 +0000 (10:18 +0200)
The writeback fixes (02c03a326a5df825cc01de426f72e160db2b9538) 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>
drivers/kvm/x86_emulate.c

index ef7518a2d7ac7a19531e22e2b42d2df176fd71dc..2136da5d69764e8931c3966fba6c6a121d015fb4 100644 (file)
@@ -1278,8 +1278,6 @@ twobyte_insn:
                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;