return xendevicemodel_op(dmod, domid, 1, &op, sizeof(op));
}
+int xendevicemodel_relocate_memory(
+ xendevicemodel_handle *dmod, domid_t domid, uint32_t size, uint64_t src_gfn,
+ uint64_t dst_gfn)
+{
+ struct xen_dm_op op;
+ struct xen_dm_op_relocate_memory *data;
+
+ memset(&op, 0, sizeof(op));
+
+ op.op = XEN_DMOP_relocate_memory;
+ data = &op.u.relocate_memory;
+
+ data->size = size;
+ data->pad = 0;
+ data->src_gfn = src_gfn;
+ data->dst_gfn = dst_gfn;
+
+ return xendevicemodel_op(dmod, domid, 1, &op, sizeof(op));
+}
+
int xendevicemodel_restrict(xendevicemodel_handle *dmod, domid_t domid)
{
return osdep_xendevicemodel_restrict(dmod, domid);
int xendevicemodel_shutdown(
xendevicemodel_handle *dmod, domid_t domid, unsigned int reason);
+/*
+ * Relocate GFNs for the specified domain.
+ *
+ * @parm dmod a handle to an open devicemodel interface.
+ * @parm domid the domain id to be serviced
+ * @parm size Number of GFNs to process
+ * @parm src_gfn Starting GFN to relocate
+ * @parm dst_gfn Starting GFN where GFNs should be relocated
+ * @return 0 on success, -1 on failure.
+ */
+int xendevicemodel_relocate_memory(
+ xendevicemodel_handle *dmod, domid_t domid, uint32_t size, uint64_t src_gfn,
+ uint64_t dst_gfn);
+
/**
* This function restricts the use of this handle to the specified
* domain.