From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: Inter VM Communication Date: Tue, 24 Mar 2009 21:19:01 -0500 Message-ID: <49C99495.5070005@codemonkey.ws> References: <3D9CB4061D1EB3408D4A0B910433453C030275936E@inbmail01.lsi.com> <49C8D5D1.3010902@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Kumar, Venkat" , "kvm@vger.kernel.org" To: Avi Kivity Return-path: Received: from qw-out-2122.google.com ([74.125.92.27]:56584 "EHLO qw-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752261AbZCYCTH (ORCPT ); Tue, 24 Mar 2009 22:19:07 -0400 Received: by qw-out-2122.google.com with SMTP id 8so2494602qwh.37 for ; Tue, 24 Mar 2009 19:19:04 -0700 (PDT) In-Reply-To: <49C8D5D1.3010902@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Avi Kivity wrote: > Kumar, Venkat wrote: >> Just like how Xen has Xenbus, Emulated Platform-PCI device and Events >> for Inter VM communication, Does KVM has any mechanism for Inter VM >> communication? How to share a page between two virtual machines >> running on KVM? >> > > If you just want to share a page (or a bunch of memory), write a qemu > PCI device model that exposes that page through a BAR. The guests can > then map the BAR and access the page. So one gotcha about using a BAR is that we emulate a 32-bit PCI device so that limits where the BAR can live in memory and how large it can be. I think bars also have to be powers of two in size. Regards, Anthony Liguori > To share the page, use normal Linux memory sharing, such as shared > memory segments or mapped files (possibly on /dev/shm). > > Note that sharing will break as soon as one of the guests is migrated > away. > > To send events you can utilize pci interrupts. > > An alternative approach is to use virtio, but this is somewhat more > complicated. >