From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O5Mfe-0007we-30 for qemu-devel@nongnu.org; Fri, 23 Apr 2010 13:28:06 -0400 Received: from [140.186.70.92] (port=54762 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O5Mfc-0007v3-1U for qemu-devel@nongnu.org; Fri, 23 Apr 2010 13:28:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O5Mfa-0005Ty-Iu for qemu-devel@nongnu.org; Fri, 23 Apr 2010 13:28:03 -0400 Received: from amistad.itbs.cz ([81.0.238.226]:58279) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5Mfa-0005Qz-DP for qemu-devel@nongnu.org; Fri, 23 Apr 2010 13:28:02 -0400 Received: from localhost (localhost [127.0.0.1]) by amistad.itbs.cz (Postfix) with ESMTP id 6C07F2F9807 for ; Fri, 23 Apr 2010 19:27:47 +0200 (CEST) Received: from amistad.itbs.cz ([127.0.0.1]) by localhost (amistad.itbs.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 30448-10 for ; Fri, 23 Apr 2010 19:27:47 +0200 (CEST) Received: from [10.0.0.14] (unknown [88.103.48.240]) by amistad.itbs.cz (Postfix) with ESMTP id 6A6152F9807 for ; Fri, 23 Apr 2010 19:27:39 +0200 (CEST) Message-ID: <4BD1D883.9080601@jermar.eu> Date: Fri, 23 Apr 2010 19:27:31 +0200 From: Jakub Jermar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Atomicity of i386 guest atomic instructions List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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