[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [PATCH v2 01/17] 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
-- 
2.3.2 (Apple Git-55)


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.