public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Aurelien Jarno <aurelien-rXXEIb44qovR7s880joybQ@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH]: KVM: Fix cmpxchg for writeback changes
Date: Wed, 25 Jul 2007 12:34:02 +0300	[thread overview]
Message-ID: <46A7190A.3080500@qumranet.com> (raw)
In-Reply-To: <20070725092506.GA19697-OqXK5JiLQY5aJl8KAwiEcA@public.gmane.org>

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 <aurelien-rXXEIb44qovR7s880joybQ@public.gmane.org>
>
> diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
> index 21ce977..9d30d10 100644
> --- a/drivers/kvm/x86_emulate.c
> +++ b/drivers/kvm/x86_emulate.c
> @@ -1275,7 +1275,7 @@ twobyte_insn:
>  		src.val = _regs[VCPU_REGS_RAX];
>  		emulate_2op_SrcV("cmp", src, dst, _eflags);
>  		/* Always write back. The question is: where to? */
> -		d |= Mov;
> +		no_wb = 0;
>  		if (_eflags & EFLG_ZF) {
>  			/* Success: write back to memory. */
>  			dst.val = src.orig_val;
>
>   

But no_wb defaults to zero?


-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.


-------------------------------------------------------------------------
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/

  parent reply	other threads:[~2007-07-25  9:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-25  9:25 [PATCH]: KVM: Fix cmpxchg for writeback changes Aurelien Jarno
     [not found] ` <20070725092506.GA19697-OqXK5JiLQY5aJl8KAwiEcA@public.gmane.org>
2007-07-25  9:34   ` Avi Kivity [this message]
     [not found]     ` <46A7190A.3080500-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-07-25  9:41       ` Aurelien Jarno
     [not found]         ` <20070725094157.GA20665-OqXK5JiLQY5aJl8KAwiEcA@public.gmane.org>
2007-07-25  9:54           ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46A7190A.3080500@qumranet.com \
    --to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=aurelien-rXXEIb44qovR7s880joybQ@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox