From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NkdBH-00008Q-8x for qemu-devel@nongnu.org; Thu, 25 Feb 2010 07:51:03 -0500 Received: from [199.232.76.173] (port=50626 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NkdBG-00008G-S4 for qemu-devel@nongnu.org; Thu, 25 Feb 2010 07:51:02 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NkdBF-00046L-Rg for qemu-devel@nongnu.org; Thu, 25 Feb 2010 07:51:02 -0500 Received: from mail-bw0-f218.google.com ([209.85.218.218]:42559) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NkdBF-00046E-Ff for qemu-devel@nongnu.org; Thu, 25 Feb 2010 07:51:01 -0500 Received: by bwz10 with SMTP id 10so1095697bwz.2 for ; Thu, 25 Feb 2010 04:51:00 -0800 (PST) Sender: Paolo Bonzini Message-ID: <4B867230.60708@redhat.com> Date: Thu, 25 Feb 2010 13:50:56 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1266524723-21572-1-git-send-email-pbonzini@redhat.com> <1266524723-21572-2-git-send-email-pbonzini@redhat.com> <20100225114048.GB9116@redhat.com> In-Reply-To: <20100225114048.GB9116@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH v2 2/2] get rid of hostregs_helper.h List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Blue Swirl , qemu-devel@nongnu.org On 02/25/2010 12:40 PM, Michael S. Tsirkin wrote: > On Thu, Feb 18, 2010 at 11:28:14PM +0200, Blue Swirl wrote: >>> /* restore global registers */ >>> -#include "hostregs_helper.h" >>> + asm(""); >>> + env = (void *) saved_env_reg; >>> > > Is this sufficient? > I see __asm__ __volatile__("": : :"memory") in virtio. > Is memory clobber implied? What about volatile? All asms without colons ("old-style") are volatile. Clobbering memory is not necessary since we are only caring about blocking assignments of "env", which is by definition in a register (hostregs_helper.h wasn't clobbering memory either). Paolo