*
* With VMs that have a lot of memory this call may block for a long time.
*/
-int xc_memshr_fork_reset(xc_interface *xch, uint32_t forked_domain);
+int xc_memshr_fork_reset(xc_interface *xch, uint32_t forked_domain,
+ bool reset_state, bool reset_memory);
/* Debug calls: return the number of pages referencing the shared frame backing
* the input argument. Should be one or greater.
return xc_memshr_memop(xch, domid, &mso);
}
-int xc_memshr_fork_reset(xc_interface *xch, uint32_t domid)
+int xc_memshr_fork_reset(xc_interface *xch, uint32_t domid, bool reset_state,
+ bool reset_memory)
{
xen_mem_sharing_op_t mso;
memset(&mso, 0, sizeof(mso));
mso.op = XENMEM_sharing_op_fork_reset;
+ if ( reset_state )
+ mso.u.fork.flags |= XENMEM_FORK_RESET_STATE;
+ if ( reset_memory )
+ mso.u.fork.flags |= XENMEM_FORK_RESET_MEMORY;
return xc_memshr_memop(xch, domid, &mso);
}