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.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html