All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <juergen.gross@ts.fujitsu.com>
To: Jan Beulich <JBeulich@novell.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [Patch] cmpxchg emulation returns wrong ZF
Date: Thu, 06 Aug 2009 10:12:24 +0200	[thread overview]
Message-ID: <4A7A9068.8020603@ts.fujitsu.com> (raw)
In-Reply-To: <4A7AAA0C020000780000E59B@vpn.id2.novell.com>

Jan Beulich wrote:
>>>> Juergen Gross <juergen.gross@ts.fujitsu.com> 06.08.09 08:49 >>>
>> Hi,
>>
>> attached patch corrects a bug in cmpxchg emulation in the hypervisor.
>>
>> BS2000 running as HVM-domain on 4 vcpus (no HAP) hit an error due to this bug
>> after several days.
> 
> Why don't you just clear ZF in that case? I think it is intentional that the
> code doesn't loop inside the hypervisor, since that loop is non-preemptible
> (whereas returning to the guest and re-issuing the instruction is).
> 
> Further, I'm not really clear why that change is necessary at all: In the
> code prior to the patch, register state is not being updated if
> ops->cmpxchg() failed, and hence the old value of ZF is simply being
> retained - which is the correct thing to do when intending to re-start
> the instruction.

Oh yes, you are right!
I missed that eip isn't updated then, too.

Please forget that patch. I'll continue to investigate the problem...


Juergen

-- 
Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 636 47950
Fujitsu Technolgy Solutions               e-mail: juergen.gross@ts.fujitsu.com
Otto-Hahn-Ring 6                        Internet: ts.fujitsu.com
D-81739 Muenchen                 Company details: ts.fujitsu.com/imprint.html

  reply	other threads:[~2009-08-06  8:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-06  6:49 [Patch] cmpxchg emulation returns wrong ZF Juergen Gross
2009-08-06  8:01 ` Jan Beulich
2009-08-06  8:12   ` Juergen Gross [this message]
2009-08-06  8:12 ` Keir Fraser

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=4A7A9068.8020603@ts.fujitsu.com \
    --to=juergen.gross@ts.fujitsu.com \
    --cc=JBeulich@novell.com \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.