From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UtbEq-0003NU-Cr for qemu-devel@nongnu.org; Mon, 01 Jul 2013 06:21:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UtbEp-0002dU-Ju for qemu-devel@nongnu.org; Mon, 01 Jul 2013 06:21:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51339) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UtbEp-0002dG-5K for qemu-devel@nongnu.org; Mon, 01 Jul 2013 06:21:39 -0400 Message-ID: <51D15830.5080504@redhat.com> Date: Mon, 01 Jul 2013 12:21:36 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1372444009-11544-1-git-send-email-pbonzini@redhat.com> <1372444009-11544-5-git-send-email-pbonzini@redhat.com> <8761wy9ded.fsf@codemonkey.ws> In-Reply-To: <8761wy9ded.fsf@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 04/30] add a header file for atomic operations List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org Il 28/06/2013 22:41, Anthony Liguori ha scritto: > Tiny copy/paste error here: s/qemu memory/memory/g". > > One thing I've been thinking about reviewing this code, what should we > be doing in virtio.c? > > We have barriers but we're relying on st[u][wlb]_phys having atomic > semantics. I think it's okay in practice but if we're taking a more > diligent approach here should we introduce atomic variants that work on > guest phys addresses? I think it's part of the semantics of stu?[wlb]_phys that they (a) are not CSE'd by the compiler (b) are atomic for aligned addresses. I cannot find the commit exactly, but I think mst added specific code for that. Paolo