On Thu, Feb 4, 2016 at 2:04 PM, hanji unit <hanjiu...@gmail.com> wrote:

> Hello, does Xen support sharing memory pages between multiple domains
> (such as as Dom0, DomU1, DomU2)? The Grant Table hypercalls seem
> limited to:
>
> IOCTL_GNTALLOC_ALLOC_GREF
> IOCTL_GNTALLOC_DEALLOC_GREF
> IOCTL_GNTALLOC_SET_UNMAP_NOTIFY
>
> Is there any mechanism to not allocate, but only share existing pages?
>

There is, it's call mem_share in Xen, but it's not very well (khm at all)
documented. You can take a look at
http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/tests/mem-sharing/memshrtool.c;h=437c7c9c472c0eff29b60e54f3de90e878de6d34;hb=HEAD
to see an outline of the tools-side functions that control it. I also have
a simple clone routine that deduplicates (clones) two identical VMs here
https://github.com/tklengyel/drakvuf/blob/master/src/xen_helper/xen_helper.c#L197
.

Cheers,
Tamas
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to