docs: document/mark-up SCHEDOP_*
PATCH v2 1/1 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.
---
v2: clarify code motion.
--- tools/libxc/xc_domain_restore.c | 10 ++++- tools/libxc/xc_domain_save.c | 9 ++++- xen/include/public/sched.h | 84 ++++++++++++++++++++++++++------------- 3 files changed, 72 insertions(+), 31 deletions(-)
tools/libxc/xc_domain_restore.c +8 -2
@@ -1895,8 +1895,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) ||
tools/libxc/xc_domain_save.c +8 -1
@@ -1867,7 +1867,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) ) {
xen/include/public/sched.h +56 -28
154 lines not on this page · raw message
Signature · 1 line
1.7.2.5
Ian Campbell writes ("[Xen-devel] [DOCDAY PATCH V2] docs: document/mark-up SCHEDOP_*"):
Quoted 6 lines
The biggest subtlety here is there additional argument when op ==
SCHEDOP_shutdownand reason ==SHUTDOWN_suspendand 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.
Keir, should Ian just commit this ? Do you want to review and ack it ? I think it would be nice to be able to get these kind of docs patches in quickly in general.
Ian.
Quoted 11 lines · Ian Jackson
Ian Campbell writes ("[Xen-devel] [DOCDAY PATCH V2] docs: document/mark-up SCHEDOP_*"):
Quoted 6 lines
The biggest subtlety here is there additional argument when op ==
SCHEDOP_shutdownand reason ==SHUTDOWN_suspendand 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.
Keir, should Ian just commit this ? Do you want to review and ack it ? I think it would be nice to be able to get these kind of docs patches in quickly in general.
Unless someone objects I'm going to push this patch today PM (BST).
Ian.
Ian Campbell writes ("[Xen-devel] [DOCDAY PATCH V2] docs: document/mark-up SCHEDOP_*"):
Quoted 6 lines
The biggest subtlety here is there additional argument when op ==
SCHEDOP_shutdownand reason ==SHUTDOWN_suspendand 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.
I have verified that this is a pure documentation patch, but not checked it for accuracy. That seems like the right level of review, so:
Ian.
Quoted 5 lines · Ian Jackson
Ian Campbell writes ("[Xen-devel] [DOCDAY PATCH V2] docs: document/mark-up SCHEDOP_*"):
Quoted 4 lines
The biggest subtlety here is there additional argument when op ==
SCHEDOP_shutdownand reason ==SHUTDOWN_suspendand its interpretation by xc_domain_{save,restore}. Add some clarifying comments to libxc as well.
Quoted 8 lines
Quoted 2 lines
This patch moves some structs around but there is no functional change other than improved documentation.
I have verified that this is a pure documentation patch, but not checked it for accuracy. That seems like the right level of review, so:
Acked-by Ian Jackson <[email protected]>
Thanks, I have applied this and the 5 patches from "docs: x86 PV MMU related functions" which you also acked this morning.
Ian.