All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Cam Macdonell <cam@cs.ualberta.ca>
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 23:06:15 +0200	[thread overview]
Message-ID: <49C94B47.2070509@redhat.com> (raw)
In-Reply-To: <49C94587.1020707@cs.ualberta.ca>

Cam Macdonell wrote:
>> 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?

I'm of course willing to take a look, but I think you should post it 
directly to the list.  More eyes mean more comments, and on this list we 
usually see constructive criticism.

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

Call qemu_set_irq(pci_dev->irq[0], 1) when you want your guest to take 
notice, and qemu_set_irq(pci_dev->irq[0], 0) when service is no longer 
necessary.

You'll also need to set pci_dev->config[PCI_INTERRUPT_PIN] to 1 to let 
the guest know you're using irq[0].

See virtio or rtl8139.c as examples.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


  reply	other threads:[~2009-03-24 21:05 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 [this message]
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=49C94B47.2070509@redhat.com \
    --to=avi@redhat.com \
    --cc=Venkat.Kumar@lsi.com \
    --cc=cam@cs.ualberta.ca \
    --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.