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