Message ID | 1397595918-30419-11-git-send-email-w1.huang@samsung.com |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBDL4J3MN6MDRBI6AW2NAKGQE6P2WBSY@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f69.google.com (mail-oa0-f69.google.com [209.85.219.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 589272036D for <linaro@patches.linaro.org>; Tue, 15 Apr 2014 21:09:56 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id i7sf53765205oag.8 for <linaro@patches.linaro.org>; Tue, 15 Apr 2014 14:09:55 -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=glKGESAADgpegJiNy66pHt8KHspzlXoQERvcoZzdLLa/xGVdS+y5iAUMMgyNP0YSTz yYZF0gwIUXwF0x8LTsijJGNWaZ2BXjugQj0Ji3jt7AvjaLa57ARzmx/Bkjo1ihYIg9td T134Nu85TGUVhXGIFKJemv+zlUUQb8ffx9vtp482MjlMNDfI1RINzwFJrsGMO/PCYkNn UQBSbwTJanjX/CRRtq+BWewhTYJLNwHMFAQ8Bhq7wCwNTl5/4wcI9CQ6pxFaAYwRgC8O +NPaOCZDrhjrDkmB2mffZkNjGsLKy//2cFlo91U7eZA32B5r5aJ+gN13+OIK6dtGpxaM 9YZg== X-Gm-Message-State: ALoCoQmV0uMJwVmINXBEPqkPLkQTASwwtKaQGj2PIzAzbtRTJT2Ay79sh0AeL/Fsf6miYPXC7kBu X-Received: by 10.182.4.76 with SMTP id i12mr1851159obi.33.1397596195919; Tue, 15 Apr 2014 14:09:55 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.51.137 with SMTP id u9ls320503qga.81.gmail; Tue, 15 Apr 2014 14:09:55 -0700 (PDT) X-Received: by 10.221.58.144 with SMTP id wk16mr3065374vcb.23.1397596195829; Tue, 15 Apr 2014 14:09:55 -0700 (PDT) Received: from mail-ve0-f174.google.com (mail-ve0-f174.google.com [209.85.128.174]) by mx.google.com with ESMTPS id la9si3622462veb.38.2014.04.15.14.09.55 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 15 Apr 2014 14:09:55 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.174; Received: by mail-ve0-f174.google.com with SMTP id oz11so9841564veb.33 for <patchwork-forward@linaro.org>; Tue, 15 Apr 2014 14:09:55 -0700 (PDT) X-Received: by 10.52.113.1 with SMTP id iu1mr2521928vdb.35.1397596195734; Tue, 15 Apr 2014 14:09:55 -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 ib8csp262239vcb; Tue, 15 Apr 2014 14:09:55 -0700 (PDT) X-Received: by 10.220.147.16 with SMTP id j16mr3122225vcv.14.1397596195477; Tue, 15 Apr 2014 14:09:55 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id sq9si3609374vdc.179.2014.04.15.14.09.54 for <multiple recipients> (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 15 Apr 2014 14:09:55 -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 <xen-devel-bounces@lists.xen.org>) id 1WaAaP-0005Fs-MZ; Tue, 15 Apr 2014 21:08:09 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from <w1.huang@samsung.com>) id 1WaAaM-0005Cd-SB for xen-devel@lists.xen.org; Tue, 15 Apr 2014 21:08:07 +0000 Received: from [85.158.139.211:14620] by server-7.bemta-5.messagelabs.com id B8/32-20531-5BF9D435; Tue, 15 Apr 2014 21:08:05 +0000 X-Env-Sender: w1.huang@samsung.com X-Msg-Ref: server-15.tower-206.messagelabs.com!1397596081!7715476!2 X-Originating-IP: [203.254.224.25] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMjAzLjI1NC4yMjQuMjUgPT4gMzcxMzg3\n X-StarScan-Received: X-StarScan-Version: 6.11.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 6737 invoked from network); 15 Apr 2014 21:08:04 -0000 Received: from mailout2.samsung.com (HELO mailout2.samsung.com) (203.254.224.25) by server-15.tower-206.messagelabs.com with DES-CBC3-SHA encrypted SMTP; 15 Apr 2014 21:08:04 -0000 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N43006ALC1FFWB0@mailout2.samsung.com> for xen-devel@lists.xen.org; Wed, 16 Apr 2014 06:08:03 +0900 (KST) X-AuditID: cbfee61a-b7fb26d00000724f-d9-534d9fb32258 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 5B.B7.29263.3BF9D435; Wed, 16 Apr 2014 06:08:03 +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:08:03 +0900 (KST) From: Wei Huang <w1.huang@samsung.com> To: xen-devel@lists.xen.org Date: Tue, 15 Apr 2014 16:05:15 -0500 Message-id: <1397595918-30419-11-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: <w1.huang@samsung.com> <1397595918-30419-1-git-send-email-w1.huang@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprGLMWRmVeSWpSXmKPExsVy+t9jQd3N832DDbYe1bFY/HgXu8Wb3g4W ixu9t9gspv+5w2bx885FRovX5z4yWyz5uJjFouPfNDYHDo/Xkycwemx/IuJx59oeNo+ju38z efRtWcUYwBrFZZOSmpNZllqkb5fAldF09SpjQR9XxZv1nWwNjJ/Yuxg5OCQETCTOt8R3MXIC mWISF+6tZwOxhQSmM0rcuujSxcgFZDczSdxsb2UFSbAJqEmcuvifBcQWEZCWuPb5MiNIEbPA HkaJht19zCAJYQEHic5DEA0sAqoSr+c9ZQRZxivgKrHyrgnEXgWJOZNsQCo4gaKTG3YzQuyN lfjQNYdpAiPvAkaGVYyiqQXJBcVJ6bmGesWJucWleel6yfm5mxjBofVMagfjygaLQ4wCHIxK PLwzcnyDhVgTy4orcw8xSnAwK4nwbmgBCvGmJFZWpRblxxeV5qQWH2KU5mBREuc90GodKCSQ nliSmp2aWpBaBJNl4uCUamCczPLCcnfzY5v1TW91G2ZHlEolPpE0sT+hPitdZY/70ebnfhyi 5Wryz/X3LLtvx/FFIljOJ3fXS8ekwId/ODZekk9otN5fe4U5/URWlZev26O0P43+V3Nvu6Qc WL/313OOJy72X1b68i0vOH6i68VPf8/bcww23zm/eZ/CVV3vjgtXY9csfCugxFKckWioxVxU nAgAHFp7JSkCAAA= 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: <patchwork-forward.linaro.org> List-Unsubscribe: <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe>, <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com> List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xen.org?subject=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.128.174 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: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
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)