From: Andreas Gustafsson <gson@gson.org>
To: malc <av1474@comtv.ru>
Cc: qemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH] target-i386: fix cmpxchg instruction emulation
Date: Sat, 10 Dec 2011 13:51:59 +0200 [thread overview]
Message-ID: <20195.18399.486776.141719@guava.gson.org> (raw)
In-Reply-To: Re: <alpine.LNX.2.00.1112101427580.1709@linmac>
malc wrote:
> On Sat, 10 Dec 2011, Andreas Gustafsson wrote:
>
> > When the i386 cmpxchg instruction is executed with a memory operand
> > and the comparison result is "unequal", do the memory write before
> > changing the accumulator instead of the other way around, because
> > otherwise the new accumulator value will incorrectly be used in the
> > comparison when the instruction is restarted after a page fault.
> >
> > This bug was originally reported on 2010-04-25 as
> > https://bugs.launchpad.net/qemu/+bug/569760
>
> I'm starting to lose count on how many times this patch resurfaces here.
This was the first time I posted the patch to the list. I originally
attached it to the bug launchpad ticket since the instructions
on the qemu web site at the time did not clearly indicate otherwise,
and was then specifically asked to send it to the mailing list. It
took me some time, but that's what I just did.
> Please see http://web.archiveorange.com/archive/v/1XS1vaW9MlyMzguWl5fE
> and the links in the thread.
Thank you for the links. This is the first time I see them, as no one
had CC:d me on that discussion, nor updated the launchpad ticket.
I found <http://emulators.com/docs/nx33_qemu_0125.htm> especially
illuminating. It should be required reading for anyone contemplating
the use of qemu for x86 emulation.
In your message of 8 Sep 2010 (which I never received), you said:
> This is tab damaged.
This has already been addressed in the version I sent to the list
today.
> Secondly it looks as if this addresses only a small part of a general
> problem [1],
Since the general problem still hasn't been addressed, the partial fix
is still better than nothing. It is being applied as part of the
local qemu patches in pkgsrc (www.pkgsrc.org), and has enabled the use
of qemu for extensive automated regression testing of NetBSD which
would not be possible without the patch.
> also in a very naive and inefficient way,
Inefficient in what way? The generated code only grows by a single
unconditional branch.
> while also opening a hole can of worms (should real parallel execution
> for TCG be ever implemented)
Would you care to explain what this can of worms is, and how it is
not already open in the original code?
--
Andreas Gustafsson, gson@gson.org
next prev parent reply other threads:[~2011-12-10 11:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-10 9:59 [Qemu-devel] [PATCH] target-i386: fix cmpxchg instruction emulation Andreas Gustafsson
2011-12-10 10:29 ` malc
2011-12-10 11:51 ` Andreas Gustafsson [this message]
2011-12-10 12:34 ` malc
2011-12-10 14:15 ` Andreas Gustafsson
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=20195.18399.486776.141719@guava.gson.org \
--to=gson@gson.org \
--cc=agraf@suse.de \
--cc=av1474@comtv.ru \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).