From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=47356 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLHbb-0004oh-Mx for qemu-devel@nongnu.org; Sun, 06 Jun 2010 11:17:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OLHN7-000214-ET for qemu-devel@nongnu.org; Sun, 06 Jun 2010 11:02:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17974) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLHN7-00020w-4B for qemu-devel@nongnu.org; Sun, 06 Jun 2010 11:02:45 -0400 Message-ID: <4C0BB88E.2070902@redhat.com> Date: Sun, 06 Jun 2010 18:02:38 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v6 5/6] Inter-VM shared memory PCI device References: <1275687942-12312-1-git-send-email-cam@cs.ualberta.ca> <1275687942-12312-2-git-send-email-cam@cs.ualberta.ca> <1275687942-12312-3-git-send-email-cam@cs.ualberta.ca> <1275687942-12312-4-git-send-email-cam@cs.ualberta.ca> <1275687942-12312-5-git-send-email-cam@cs.ualberta.ca> <1275687942-12312-6-git-send-email-cam@cs.ualberta.ca> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Cam Macdonell , qemu-devel@nongnu.org, kvm@vger.kernel.org On 06/05/2010 12:44 PM, Blue Swirl wrote: > On Fri, Jun 4, 2010 at 9:45 PM, Cam Macdonell wrote: > >> Support an inter-vm shared memory device that maps a shared-memory object as a >> PCI device in the guest. This patch also supports interrupts between guest by >> communicating over a unix domain socket. This patch applies to the qemu-kvm >> repository. >> >> -device ivshmem,size=[,shm=] >> >> Interrupts are supported between multiple VMs by using a shared memory server >> by using a chardev socket. >> >> -device ivshmem,size=[,shm=] >> [,chardev=][,msi=on][,irqfd=on][,vectors=n][,role=peer|master] >> -chardev socket,path=,id= >> >> (shared memory server is qemu.git/contrib/ivshmem-server) >> >> Sample programs and init scripts are in a git repo here: >> >> > Why is this KVM specific BTW, Posix SHM is available on many > platforms? What would happen if kvm_set_foobar functions were not > called when KVM is not being used? Is host eventfd support essential? > It's not kvm specific, it's atomic-ops-on-shared-memory-are-visible-as-atomic-ops specific, which is currently only available with kvm. When tcg gains true smp support (and not just against other tcg threads) this can work with tcg as well. I guess that needs a host with at least 32/64 bit CAS for 32/64 bit targets respectively, and double that if the target has DCAS. Not sure how targets with ll/sc can be implemented, especially if there are limits as to what can go in between. -- error compiling committee.c: too many arguments to function