On Wed, Jul 25, 2007 at 12:34:02PM +0300, Avi Kivity wrote:
> Aurelien Jarno wrote:
> >   KVM: Fix writeback for cmpxchg instruction
> >
> >   The writeback fixes (02c03a326a5df825cc01de426f72e160db2b9538) broke
> >   cmpxchg emulation.  The patch below fixes that.
> >
> >   Signed-off-by: Aurelien Jarno <[EMAIL PROTECTED]>
> >

[snip]

> But no_wb defaults to zero?

Oops right. So please find a new patch below.

  KVM: Remove dead code in the cmpxchg instruction emulation

  The writeback fixes (02c03a326a5df825cc01de426f72e160db2b9538) let
  some dead code in the cmpxchg instruction emulation. Remove it.

  Signed-off-by: Aurelien Jarno <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 21ce977..7b1baec 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -1274,8 +1274,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;

-- 
  .''`.  Aurelien Jarno             | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [EMAIL PROTECTED]         | [EMAIL PROTECTED]
   `-    people.debian.org/~aurel32 | www.aurel32.net

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to