[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [mini-os master] Save/Restore Support: Refactor HYPERVISOR_suspend hypercall
commit 2f1419545d1067160c8dc1f7f56c6237e66612b8 Author: Bruno Alvisio <bruno.alvisio@xxxxxxxxx> AuthorDate: Sun Dec 10 22:51:07 2017 -0800 Commit: Wei Liu <wei.liu2@xxxxxxxxxx> CommitDate: Wed Mar 21 09:16:49 2018 +0000 Save/Restore Support: Refactor HYPERVISOR_suspend hypercall Directly using the SHUTDOWN_suspend macro as a parameter for the schedop hypercall causes an error in the Xen hypercall handler. Also for consistency, the SHUTDOWN_suspend param is wrapped in the sched_shutdown struct. Signed-off-by: Bruno Alvisio <bruno.alvisio@xxxxxxxxx> Reviewed-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx> --- include/x86/x86_32/hypercall-x86_32.h | 4 ++-- include/x86/x86_64/hypercall-x86_64.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/x86/x86_32/hypercall-x86_32.h b/include/x86/x86_32/hypercall-x86_32.h index 5c93464..70505a4 100644 --- a/include/x86/x86_32/hypercall-x86_32.h +++ b/include/x86/x86_32/hypercall-x86_32.h @@ -298,8 +298,8 @@ static inline int HYPERVISOR_suspend( unsigned long srec) { - return _hypercall3(int, sched_op, SCHEDOP_shutdown, - SHUTDOWN_suspend, srec); + struct sched_shutdown shutdown = { .reason = SHUTDOWN_suspend }; + return _hypercall3(int, sched_op, SCHEDOP_shutdown, &shutdown, srec); } static inline int diff --git a/include/x86/x86_64/hypercall-x86_64.h b/include/x86/x86_64/hypercall-x86_64.h index 6171812..95f8ade 100644 --- a/include/x86/x86_64/hypercall-x86_64.h +++ b/include/x86/x86_64/hypercall-x86_64.h @@ -305,8 +305,8 @@ static inline int HYPERVISOR_suspend( unsigned long srec) { - return _hypercall3(int, sched_op, SCHEDOP_shutdown, - SHUTDOWN_suspend, srec); + struct sched_shutdown shutdown = { .reason = SHUTDOWN_suspend }; + return _hypercall3(int, sched_op, SCHEDOP_shutdown, &shutdown, srec); } static inline int -- generated by git-patchbot for /home/xen/git/mini-os.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |