Skip to contentSkip to conversation

libxc: add xc_domain_add_to_physmap_batch to wrap XENMEM_add_to_physmap_batch

PATCH In review Zhongze Liu 2 participants 2 messages Jun 22, 2017 – Jun 28, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 libxc: add xc_domain_add_to_physmap_batch to wrap XENMEM_add_to_physmap_batch

This is a preparation for the proposal "allow setting up shared memory areas between VMs from xl config file". See:
V2: https://lists.xen.org/archives/html/xen-devel/2017-06/msg02256.html
V1: https://lists.xen.org/archives/html/xen-devel/2017-05/msg01288.html

The plan is to use XENMEM_add_to_physmap_batch in xl to map foregin pages from one DomU to another so that the page could be shared. But currently there is no wrapper for XENMEM_add_to_physmap_batch in libxc, so we just add a wrapper for it.

---
Changed Since v2:
* fix coding style issue
* let rc = 1 on buffer bouncing failures

Changed Since v1:
* explain why such a sudden wrapper
* change the parameters' types

Cc Ian Jackson <[email protected]>,
Cc Wei Liu <[email protected]>,
Cc Stefano Stabellini <[email protected]>
Cc Julien Grall <[email protected]>
Cc Jan Beulich <[email protected]
---
 tools/libxc/include/xenctrl.h |  9 +++++++++
 tools/libxc/xc_domain.c       | 45 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+)
tools/libxc/include/xenctrl.h +9 -0
index 1629f412dd..9501818558 100644
@@ -1372,6 +1372,15 @@ int xc_domain_add_to_physmap(xc_interface *xch,
                              unsigned long idx,
                              xen_pfn_t gpfn);
 
+int xc_domain_add_to_physmap_batch(xc_interface *xch,
+                                   domid_t domid,
+                                   domid_t foreign_domid,
+                                   unsigned int space,
+                                   unsigned int size,
+                                   xen_ulong_t *idxs,
+                                   xen_pfn_t *gfpns,
+                                   int *errs);
+
 int xc_domain_populate_physmap(xc_interface *xch,
                                uint32_t domid,
                                unsigned long nr_extents,
tools/libxc/xc_domain.c +45 -0

51 lines not on this page · raw message

Signature · 7 lines
2.13.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Acked-by on v3 1/1
#1 lore raw
Quoted 11 lines · Zhongze Liu

This is a preparation for the proposal "allow setting up shared memory areas between VMs from xl config file". See:
V2: https://lists.xen.org/archives/html/xen-devel/2017-06/msg02256.html
V1: https://lists.xen.org/archives/html/xen-devel/2017-05/msg01288.html

The plan is to use XENMEM_add_to_physmap_batch in xl to map foregin pages from one DomU to another so that the page could be shared. But currently there is no wrapper for XENMEM_add_to_physmap_batch in libxc, so we just add a wrapper for it.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel