aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2012-11-19 14:25:31 +0000
committerIan Campbell <ian.campbell@citrix.com>2012-11-19 14:25:31 +0000
commitb1a83cf4f95072f245097c2eb802f1e2d03376c8 (patch)
treeff6b99ba508732791a822234ae44c60594a8588d /tools/libxc
parent163dc5de3f8c21ace92150a2e817b85b1006f547 (diff)
downloadxen-b1a83cf4f95072f245097c2eb802f1e2d03376c8.tar.gz
xen-b1a83cf4f95072f245097c2eb802f1e2d03376c8.tar.bz2
xen-b1a83cf4f95072f245097c2eb802f1e2d03376c8.zip
docs: document/mark-up SCHEDOP_*
The biggest subtlety here is there additional argument when op == SCHEDOP_shutdown and reason == SHUTDOWN_suspend and its interpretation by xc_domain_{save,restore}. Add some clarifying comments to libxc as well. This patch moves some structs around but there is no functional change other than improved documentation. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/libxc')
-rw-r--r--tools/libxc/xc_domain_restore.c10
-rw-r--r--tools/libxc/xc_domain_save.c9
2 files changed, 16 insertions, 3 deletions
diff --git a/tools/libxc/xc_domain_restore.c b/tools/libxc/xc_domain_restore.c
index a85a0413d6..02bfa1c163 100644
--- a/tools/libxc/xc_domain_restore.c
+++ b/tools/libxc/xc_domain_restore.c
@@ -1967,8 +1967,14 @@ int xc_domain_restore(xc_interface *xch, int io_fd, uint32_t dom,
if ( i == 0 )
{
/*
- * Uncanonicalise the suspend-record frame number and poke
- * resume record.
+ * Uncanonicalise the start info frame number and poke in
+ * updated values into the start info itself.
+ *
+ * The start info MFN is the 3rd argument to the
+ * HYPERVISOR_sched_op hypercall when op==SCHEDOP_shutdown
+ * and reason==SHUTDOWN_suspend, it is canonicalised in
+ * xc_domain_save and therefore the PFN is found in the
+ * edx register.
*/
pfn = GET_FIELD(ctxt, user_regs.edx);
if ( (pfn >= dinfo->p2m_size) ||
diff --git a/tools/libxc/xc_domain_save.c b/tools/libxc/xc_domain_save.c
index 57d5347363..d48e9c0fb0 100644
--- a/tools/libxc/xc_domain_save.c
+++ b/tools/libxc/xc_domain_save.c
@@ -1868,7 +1868,14 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter
goto out;
}
- /* Canonicalise the suspend-record frame number. */
+ /*
+ * Canonicalise the start info frame number.
+ *
+ * The start info MFN is the 3rd argument to the
+ * HYPERVISOR_sched_op hypercall when op==SCHEDOP_shutdown and
+ * reason==SHUTDOWN_suspend and is therefore found in the edx
+ * register.
+ */
mfn = GET_FIELD(&ctxt, user_regs.edx);
if ( !MFN_IS_IN_PSEUDOPHYS_MAP(mfn) )
{