|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH RFC v2 5/9] xen/arm: Implement modify_returncode
From: Alexey Sokolov <sokolov.a@xxxxxxxxxxx>
Making sched_op in do_suspend (driver/xen/manage.c) returns 0
on the success of suspend.
Singed-off-by: Alexey Sokolov <sokolov.a@xxxxxxxxxxx>
---
tools/include/xen-foreign/reference.size | 2 +-
tools/libxc/xc_resume.c | 25 +++++++++++++++++++++++++
2 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/tools/include/xen-foreign/reference.size
b/tools/include/xen-foreign/reference.size
index de36455..dfd691c 100644
--- a/tools/include/xen-foreign/reference.size
+++ b/tools/include/xen-foreign/reference.size
@@ -5,7 +5,7 @@ start_info | - - 1112 1168
trap_info | - - 8 16
cpu_user_regs | - - 68 200
vcpu_guest_core_regs | 304 304 - -
-vcpu_guest_context | 336 336 2800 5168
+vcpu_guest_context | 440 440 2800 5168
arch_vcpu_info | - - 24 16
vcpu_time_info | - - 32 32
vcpu_info | - - 64 64
diff --git a/tools/libxc/xc_resume.c b/tools/libxc/xc_resume.c
index 1c43ec6..32b58b9 100644
--- a/tools/libxc/xc_resume.c
+++ b/tools/libxc/xc_resume.c
@@ -87,6 +87,31 @@ static int modify_returncode(xc_interface *xch, uint32_t
domid)
return 0;
}
+#elif defined(__arm__)
+
+static int modify_returncode(xc_interface *xch, uint32_t domid)
+{
+ vcpu_guest_context_any_t ctxt;
+ xc_dominfo_t info;
+ int rc;
+
+ if (xc_domain_getinfo(xch, domid, 1, &info) != 1)
+ {
+ PERROR("Could not get domain info");
+ return -1;
+ }
+
+ if ( (rc = xc_vcpu_getcontext(xch, domid, 0, &ctxt)) != 0 )
+ return rc;
+
+ ctxt.c.user_regs.r0_usr = 1;
+
+ if ( (rc = xc_vcpu_setcontext(xch, domid, 0, &ctxt)) != 0 )
+ return rc;
+
+ return 0;
+}
+
#else
static int modify_returncode(xc_interface *xch, uint32_t domid)
--
1.8.1.2
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |