qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Jermar <jakub@jermar.eu>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Atomicity of i386 guest atomic instructions
Date: Fri, 23 Apr 2010 19:27:31 +0200	[thread overview]
Message-ID: <4BD1D883.9080601@jermar.eu> (raw)

Hello,

is it at least theoretically possible that the guest atomic instructions (e.g. XCHG,
LOCK CMPXCHG) on target-i386 are somehow not atomic when simulated/translated by Qemu?

I am observing a problem with one of my HelenOS/ia32 builds which suggests me that for
some reason HelenOS spinlocks are not working as expected, because at one point there are 
two CPUs in one spinlock-protected critical section. I have been looking into this for
several days and could not find anything on the HelenOS side. The assembly code which
does the locking looks good and the respective spinlock is not corrupted. The problem
shows in about 2/3 of all dual-CPU boots. When it shows, the stack trace is always the
same. When it does not show during the boot, the system continues to run stable and I
never see the problem after the system started up.

I reproduced this on Qemu 0.11.1 and 0.12.2-3 without kvm, both on ia32 and amd64 hosts.

Any idea appreciated.

Regards,
Jakub

             reply	other threads:[~2010-04-23 17:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-23 17:27 Jakub Jermar [this message]
2010-04-23 20:57 ` [Qemu-devel] Atomicity of i386 guest atomic instructions Alexander Graf
2010-04-24  2:49   ` Jamie Lokier
2010-04-28 22:27     ` Paul Brook

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=4BD1D883.9080601@jermar.eu \
    --to=jakub@jermar.eu \
    --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).