From patchwork Tue Apr 15 21:05:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Huang X-Patchwork-Id: 28435 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f198.google.com (mail-pd0-f198.google.com [209.85.192.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D43CE2036D for ; Tue, 15 Apr 2014 21:09:59 +0000 (UTC) Received: by mail-pd0-f198.google.com with SMTP id fp1sf34449041pdb.5 for ; Tue, 15 Apr 2014 14:09:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:cc:subject:precedence:list-id:list-unsubscribe:list-post :list-help:list-subscribe:mime-version:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :list-archive:content-type:content-transfer-encoding; bh=//ZWlTgavKX8tbX8blNUiYHxBpUr77Ce4bAsFHOJeRI=; b=F6rBOcrZukDNMDYx/HL/OkGGI6oZLj1CQ3CqoFRAHQHjypryiEck4ZHd++QzrspBhA UnDTp2W8o6Jt17czILXGIsp3PPs6v9UzvCUXjXfEZzUDSjuqggIVIq2dYVGZPMmgfsTI 19qQKpQxGMy0tW+y7Bgh4xmorm+7YvBtqKT3C/rw2kHvuYT0kevxgqAXiPMSdkR6nlMj fvt9SgzuGuihSAzMkIxTYSis8qPaaxMRqVcUV5epUeebLFGjiR6hg/R069GIKBk/170+ FS8lBG6s8Gut9/okIEjGV0p5uoOJOYIVh2EfG8lDKxFNqA8EWKWPRzS/Bkt34F+nsmoP EvvQ== X-Gm-Message-State: ALoCoQnX8Br59pM6lLIUshbJHP8laMQr3b53J74dJPQ6zN4C0dlOnI9O8jmHkkhhVdk8LXKYMPeK X-Received: by 10.66.102.36 with SMTP id fl4mr1884516pab.20.1397596199091; Tue, 15 Apr 2014 14:09:59 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.107.198 with SMTP id h64ls305833qgf.84.gmail; Tue, 15 Apr 2014 14:09:58 -0700 (PDT) X-Received: by 10.52.241.106 with SMTP id wh10mr2596837vdc.16.1397596198903; Tue, 15 Apr 2014 14:09:58 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id kp12si3622779veb.66.2014.04.15.14.09.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 15 Apr 2014 14:09:58 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id ik5so10215321vcb.28 for ; Tue, 15 Apr 2014 14:09:58 -0700 (PDT) X-Received: by 10.221.22.71 with SMTP id qv7mr2025787vcb.34.1397596198820; Tue, 15 Apr 2014 14:09:58 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp262242vcb; Tue, 15 Apr 2014 14:09:58 -0700 (PDT) X-Received: by 10.229.66.133 with SMTP id n5mr6123594qci.0.1397596198315; Tue, 15 Apr 2014 14:09:58 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id v10si8572225qat.231.2014.04.15.14.09.57 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 15 Apr 2014 14:09:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WaAa9-000555-0m; Tue, 15 Apr 2014 21:07:53 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WaAa7-00054j-L7 for xen-devel@lists.xen.org; Tue, 15 Apr 2014 21:07:51 +0000 Received: from [85.158.137.68:54598] by server-4.bemta-3.messagelabs.com id 3B/95-17399-6AF9D435; Tue, 15 Apr 2014 21:07:50 +0000 X-Env-Sender: w1.huang@samsung.com X-Msg-Ref: server-11.tower-31.messagelabs.com!1397596066!7183643!2 X-Originating-IP: [203.254.224.24] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMjAzLjI1NC4yMjQuMjQgPT4gMzY1MDA2\n X-StarScan-Received: X-StarScan-Version: 6.11.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 1860 invoked from network); 15 Apr 2014 21:07:49 -0000 Received: from mailout1.samsung.com (HELO mailout1.samsung.com) (203.254.224.24) by server-11.tower-31.messagelabs.com with DES-CBC3-SHA encrypted SMTP; 15 Apr 2014 21:07:49 -0000 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N43000Z0C0ZK580@mailout1.samsung.com> for xen-devel@lists.xen.org; Wed, 16 Apr 2014 06:07:47 +0900 (KST) X-AuditID: cbfee61a-b7fb26d00000724f-63-534d9fa3ad4f Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 85.A7.29263.3AF9D435; Wed, 16 Apr 2014 06:07:47 +0900 (KST) Received: from weihp.spa.sarc.sas ([105.140.31.10]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N43002SLC0INC00@mmp2.samsung.com>; Wed, 16 Apr 2014 06:07:46 +0900 (KST) From: Wei Huang To: xen-devel@lists.xen.org Date: Tue, 15 Apr 2014 16:05:08 -0500 Message-id: <1397595918-30419-4-git-send-email-w1.huang@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1397595918-30419-1-git-send-email-w1.huang@samsung.com> References: <1397595918-30419-1-git-send-email-w1.huang@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprOLMWRmVeSWpSXmKPExsVy+t9jQd3F832DDXY95bdY/HgXu8Wb3g4W ixu9t9gspv+5w2bx885FRovX5z4yWyz5uJjFouPfNDYHDo/Xkycwemx/IuJx59oeNo+ju38z efRtWcUYwBrFZZOSmpNZllqkb5fAldF09SpjQR9XxZv1nWwNjJ/Yuxg5OSQETCRO7O5lgrDF JC7cW8/WxcjFISQwnVFi35mdjCAJIYFmJok1s1VBbDYBNYlTF/+zgNgiAtIS1z5fZgRpYBbY wyjRsLuPGSQhLOAg0XmolRXEZhFQlbi3+w9QAwcHr4CLxKovWSCmhICCxJxJNiAVnAKuEpMb dkOtipX40DWHaQIj7wJGhlWMoqkFyQXFSem5hnrFibnFpXnpesn5uZsYwcH1TGoH48oGi0OM AhyMSjy8M3J8g4VYE8uKK3MPMUpwMCuJ8G5oAQrxpiRWVqUW5ccXleakFh9ilOZgURLnPdBq HSgkkJ5YkpqdmlqQWgSTZeLglGpgXHt0msXcrcF2y13uy6/dUX6sfrXDbn4DF5+PC/NnfErt 2fiWx/9Wdcjx8J+dwosSZC59s/++/nRowu8ye/WCd0U7eV4mJDJsXTqd321h2HyFrmLrs6zL b2yJ/2k7a6751Q0PE5/c+rtzzR23T/djC7XPWMvHXdlq5yP6V3Dyji9HvVrz55jFfFBiKc5I NNRiLipOBABM7bFRKgIAAA== Cc: w1.huang@samsung.com, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, julien.grall@linaro.org, jaeyong.yoo@samsung.com, yjhyun.yoo@samsung.com Subject: [Xen-devel] [RFC v2 3/6] xen/arm: support guest do_suspend function X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: w1.huang@samsung.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: From: Jaeyong Yoo Making sched_op in do_suspend (driver/xen/manage.c) returns 0 on the success of suspend. Signed-off-by: Alexey Sokolov Signed-off-by: Wei Huang --- 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..2b09990 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__) || defined(__aarch64__) + +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 -EINVAL; + } + + 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)