[libvirt] Memory access API

Hi, Is there any zero-copy VM memory access API in libvirt? I see only virDomainMemoryPeek function, which copy some memory from VM and do not permit VM memory modifications. What I'm looking for is xen xc_map_foreign_pages or xc_gnttab_map_domain_grant_refs equivalent/wrapper. IOW map memory pages to dom0 address space, without copy. I know that not every hypervisor supports it, but it is useful to build a high-performance communication channel on top of it. -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab

On Wed, Jun 19, 2013 at 04:29:48AM +0200, Marek Marczykowski-Górecki wrote:
Hi,
Is there any zero-copy VM memory access API in libvirt? I see only virDomainMemoryPeek function, which copy some memory from VM and do not permit VM memory modifications. What I'm looking for is xen xc_map_foreign_pages or xc_gnttab_map_domain_grant_refs equivalent/wrapper. IOW map memory pages to dom0 address space, without copy. I know that not every hypervisor supports it, but it is useful to build a high-performance communication channel on top of it.
The only way to access memory from libvirt is via virDomainMemoryPeek currently. QEMU has an 'ivshm' device for doing shared memory segments between VMs and/or host, which would be zero-copy but support for this has not yet been integrated in libvirt. Patches are welcome if anyone wants to add this though. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
participants (2)
-
Daniel P. Berrange
-
Marek Marczykowski-Górecki