From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jaeyong Yoo Subject: [PATCH v5 3/6] xen/arm: Implement modify_returncode Date: Wed, 06 Nov 2013 12:46:14 +0900 Message-ID: <00b001cedaa2$bdd05fb0$39711f10$%yoo@samsung.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3771589864220973380==" Return-path: Content-language: ko List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: 'Alexey Sokolov' List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --===============3771589864220973380== Content-type: multipart/alternative; boundary="----=_NextPart_000_00B1_01CEDAEE.2DB807B0" Content-language: ko This is a multi-part message in MIME format. ------=_NextPart_000_00B1_01CEDAEE.2DB807B0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Making sched_op in do_suspend (driver/xen/manage.c) returns 0 on the success of suspend. Singed-off-by: Alexey Sokolov --- tools/libxc/xc_resume.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tools/libxc/xc_resume.c b/tools/libxc/xc_resume.c 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 ------=_NextPart_000_00B1_01CEDAEE.2DB807B0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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

 

Singed-off-by: Alexey Sokolov = <sokolov.a@samsung.com>

---

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

1 file changed, 25 = insertions(+)

 

diff --git a/tools/libxc/xc_resume.c = b/tools/libxc/xc_resume.c

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) !=3D 1 = )

+    {

+        = PERROR("Could not get domain info");

+        return = -1;

+    }

+

+    if ( (rc =3D = xc_vcpu_getcontext(xch, domid, 0, &ctxt)) !=3D 0 = )

+        return = rc;

+

+    ctxt.c.user_regs.r0_usr =3D = 1;

+

+    if ( (rc =3D xc_vcpu_setcontext(xch, = domid, 0, &ctxt)) !=3D 0 )

+        return = rc;

+

+    return 0;

+}

+

#else

 

static int = modify_returncode(xc_interface *xch, uint32_t = domid)

--

1.8.1.2

------=_NextPart_000_00B1_01CEDAEE.2DB807B0-- --===============3771589864220973380== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============3771589864220973380==--