diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h index 235b8bb847..543abfcb34 100644 --- a/tools/libxc/include/xenctrl.h +++ b/tools/libxc/include/xenctrl.h @@ -1416,6 +1416,10 @@ int xc_domain_add_to_physmap_batch(xc_interface *xch, xen_pfn_t *gfpns, int *errs); +int xc_domain_remove_from_physmap(xc_interface *xch, + uint32_t domid, + xen_pfn_t gpfn); + int xc_domain_populate_physmap(xc_interface *xch, uint32_t domid, unsigned long nr_extents, diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c index da0aa2f6a8..ea3df1ef31 100644 --- a/tools/libxc/xc_domain.c +++ b/tools/libxc/xc_domain.c @@ -1090,6 +1090,17 @@ out: return rc; } +int xc_domain_remove_from_physmap(xc_interface *xch, + uint32_t domid, + xen_pfn_t gpfn) +{ + struct xen_remove_from_physmap xrfp = { + .domid = domid, + .gpfn = gpfn, + }; + return do_memory_op(xch, XENMEM_remove_from_physmap, &xrfp, sizeof(xrfp)); +} + int xc_domain_claim_pages(xc_interface *xch, uint32_t domid, unsigned long nr_pages)