public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Cam Macdonell <cam@cs.ualberta.ca>
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 14:41:43 -0600	[thread overview]
Message-ID: <49C94587.1020707@cs.ualberta.ca> (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.
> 
> To share the page, use normal Linux memory sharing, such as shared 
> memory segments or mapped files (possibly on /dev/shm).

I've actually created a patch (and corresponding device driver) that 
works this way based on Avi's suggestion of this approach before.  I'm 
willing to release it of course, but it's in pretty rough form being my 
first Qemu/KVM PCI device.  Avi (or anyone else), would you mind having 
a quick look first before I release it to the list?

FYI, I'm using this for my PhD research.

> Note that sharing will break as soon as one of the guests is migrated away.
> 
> To send events you can utilize pci interrupts.

I haven't implemented PCI interrupts yet, but would appreciate some 
pointers on how to go about this.

Thanks,
Cam

  reply	other threads:[~2009-03-24 21:09 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 [this message]
2009-03-24 21:06     ` Avi Kivity
2009-03-24 22:31     ` Brian Jackson
2009-03-25  2:19   ` Anthony Liguori
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=49C94587.1020707@cs.ualberta.ca \
    --to=cam@cs.ualberta.ca \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox