From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47300) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Taqzw-00038D-Ro for qemu-devel@nongnu.org; Tue, 20 Nov 2012 11:48:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Taqzs-0002H7-3b for qemu-devel@nongnu.org; Tue, 20 Nov 2012 11:48:32 -0500 Received: from mail-ie0-f173.google.com ([209.85.223.173]:35108) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Taqzr-0002H2-UQ for qemu-devel@nongnu.org; Tue, 20 Nov 2012 11:48:28 -0500 Received: by mail-ie0-f173.google.com with SMTP id k14so4672220iea.4 for ; Tue, 20 Nov 2012 08:48:27 -0800 (PST) Sender: Paolo Bonzini Message-ID: <50ABB452.4070401@redhat.com> Date: Tue, 20 Nov 2012 17:48:18 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <50ABB0A4.9030600@bull.net> In-Reply-To: <50ABB0A4.9030600@bull.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] PCI CAS implementation in qemu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Francois WELLENREITER Cc: qemu-devel@nongnu.org Il 20/11/2012 17:32, Francois WELLENREITER ha scritto: > > I order to develop a qemu module, I aim to use the PCI CAS (compare > and swap) function to guarantee an atomic access somewhere in the > guest memory (in a multi-core emulation case). > > Nevertheless, I did not find any routine in qemu implementing this > function. > > Could anyone on this list tell me if this is implemented and if that's > not the case, if this would be hard to get implemented ? (I know nothing about PCI CAS). Can you just use a compare-and-swap in the QEMU device model (via __sync_val_compare_and_swap for example)? Paolo