Skip to contentSkip to conversation

xen/arm: Implement modify_returncode

PATCH Superseded Jaeyong Yoo 1 participant 1 message Nov 6, 2013

lore
Share & tools
lore
#0 lore raw

PATCH v5 3/6 xen/arm: Implement modify_returncode

Making sched_op in do_suspend (driver/xen/manage.c) returns 0 on the success of suspend.

---

tools/libxc/xc_resume.c | 25 +++++++++++++++++++++++++

1 file changed, 25 insertions(+)
tools/libxc/xc_resume.c +0 -0

index 18b4818..9315eb8 100644

--- a/tools/libxc/xc_resume.c

+++ b/tools/libxc/xc_resume.c

@@ -73,6 +73,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
[email protected]
http://lists.xen.org/xen-devel