From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Inter VM Communication Date: Tue, 24 Mar 2009 14:45:05 +0200 Message-ID: <49C8D5D1.3010902@redhat.com> References: <3D9CB4061D1EB3408D4A0B910433453C030275936E@inbmail01.lsi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "kvm@vger.kernel.org" To: "Kumar, Venkat" Return-path: Received: from mx2.redhat.com ([66.187.237.31]:58300 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751815AbZCXMpL (ORCPT ); Tue, 24 Mar 2009 08:45:11 -0400 In-Reply-To: <3D9CB4061D1EB3408D4A0B910433453C030275936E@inbmail01.lsi.com> Sender: kvm-owner@vger.kernel.org List-ID: 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. 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. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.