All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Avi Kivity <avi@redhat.com>
Cc: "Kumar, Venkat" <Venkat.Kumar@lsi.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: Inter VM Communication
Date: Tue, 24 Mar 2009 21:19:01 -0500	[thread overview]
Message-ID: <49C99495.5070005@codemonkey.ws> (raw)
In-Reply-To: <49C8D5D1.3010902@redhat.com>

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.
>


  parent reply	other threads:[~2009-03-25  2:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-24 11:00 Inter VM Communication Kumar, Venkat
2009-03-24 12:45 ` Avi Kivity
2009-03-24 20:41   ` Cam Macdonell
2009-03-24 21:06     ` Avi Kivity
2009-03-24 22:31     ` Brian Jackson
2009-03-25  2:19   ` Anthony Liguori [this message]
2009-03-25  6:44     ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49C99495.5070005@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=Venkat.Kumar@lsi.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.