From patchwork Thu Apr 10 16:48:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Huang X-Patchwork-Id: 28234 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f199.google.com (mail-ob0-f199.google.com [209.85.214.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2D5A221308 for ; Thu, 10 Apr 2014 16:53:57 +0000 (UTC) Received: by mail-ob0-f199.google.com with SMTP id wo20sf18862837obc.6 for ; Thu, 10 Apr 2014 09:53:56 -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=vp1GofRtFj8i71LSFXrFEyBid+2pVYDhwahoMJgqVWo=; b=PWAxT8/7doXdGgtPT+lHPXUgF08Bl2FBbOCMI9qwGfjz3o1yHV9QuBbvvBd922RNkm bgNvEMK7CYp9aS/4pZu8HnpyOUWOEMCf2eEp+155yU5HoTP0ChaAS7P1JIjwIevxFVDB UhuS4X8DoM4M9FyYkx5OZr0yC+35wvI/Ny2Z5os2U+68+CXHD9egnBJeqSnzhyL59ssJ 2cBODcT0yafl4Ag2gP/FOqITA3zgXYfdYcMptis/KVasGeFNyC7IsLioXbVBQ8VS/AK5 L4MO5toAuQTo6BNFstYBOKZxUlznzRZKom69kC7mTYPDIbScZBbrwW3nNkeklfKe5ZPZ Dslg== X-Gm-Message-State: ALoCoQnsXLfuuB4/br11vl8u2/oUPV+OlBRg09xNe221/uBYKjgJGEtt6m6kfyVZIXg8Ou4RHxII X-Received: by 10.43.117.71 with SMTP id fl7mr2349470icc.24.1397148836568; Thu, 10 Apr 2014 09:53:56 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.108.97 with SMTP id i88ls1171486qgf.78.gmail; Thu, 10 Apr 2014 09:53:56 -0700 (PDT) X-Received: by 10.58.187.9 with SMTP id fo9mr14859143vec.4.1397148836310; Thu, 10 Apr 2014 09:53:56 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id bj3si791302vcb.172.2014.04.10.09.53.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Apr 2014 09:53:56 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.175 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.175; Received: by mail-vc0-f175.google.com with SMTP id lh14so3683495vcb.34 for ; Thu, 10 Apr 2014 09:53:56 -0700 (PDT) X-Received: by 10.58.49.10 with SMTP id q10mr14765211ven.5.1397148836233; Thu, 10 Apr 2014 09:53:56 -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 ib8csp75317vcb; Thu, 10 Apr 2014 09:53:55 -0700 (PDT) X-Received: by 10.140.50.74 with SMTP id r68mr20892666qga.22.1397148835160; Thu, 10 Apr 2014 09:53:55 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id o60si2151847qga.60.2014.04.10.09.53.54 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 10 Apr 2014 09:53: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 ) id 1WYIC9-0000mK-Gv; Thu, 10 Apr 2014 16:51:21 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WYIC8-0000lr-0D for xen-devel@lists.xen.org; Thu, 10 Apr 2014 16:51:20 +0000 Received: from [85.158.139.211:30304] by server-16.bemta-5.messagelabs.com id 89/13-19700-70CC6435; Thu, 10 Apr 2014 16:51:19 +0000 X-Env-Sender: w1.huang@samsung.com X-Msg-Ref: server-11.tower-206.messagelabs.com!1397148671!4937538!3 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 9631 invoked from network); 10 Apr 2014 16:51:16 -0000 Received: from mailout2.samsung.com (HELO mailout2.samsung.com) (203.254.224.25) by server-11.tower-206.messagelabs.com with DES-CBC3-SHA encrypted SMTP; 10 Apr 2014 16:51:16 -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 <0N3T00D6LQTE79C0@mailout2.samsung.com> for xen-devel@lists.xen.org; Fri, 11 Apr 2014 01:51:14 +0900 (KST) X-AuditID: cbfee61a-b7fb26d00000724f-1c-5346cc025a2b Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id E4.0C.29263.20CC6435; Fri, 11 Apr 2014 01:51:14 +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 <0N3T00LLWQT18X00@mmp2.samsung.com>; Fri, 11 Apr 2014 01:51:14 +0900 (KST) From: Wei Huang To: xen-devel@lists.xen.org Date: Thu, 10 Apr 2014 16:48:56 +0000 Message-id: <1397148539-19084-4-git-send-email-w1.huang@samsung.com> X-Mailer: git-send-email 1.8.3.2 In-reply-to: <1397148539-19084-1-git-send-email-w1.huang@samsung.com> References: <1397148539-19084-1-git-send-email-w1.huang@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprCLMWRmVeSWpSXmKPExsVy+t9jQV2mM27BBidnS1q86e1gsbjRe4vN YvqfO2wWP+9cZLR4fe4js8WSj4tZLDr+TWNzYPd4PXkCo8f2JyIed67tYfM4uvs3k0ffllWM AaxRXDYpqTmZZalF+nYJXBkXd/9kK9jHWXFjw2WWBsbV7F2MHBwSAiYS2y/ldTFyApliEhfu rWfrYuTiEBKYzijR/vUdE4TTzCTReGYrG0gVm4CaxKmL/1lAbBEBaYlrny8zghQxCyxklOjd /BksISxgLXHu8z8wm0VAVWL/soPMIDavgIvE4c4H7BDrFCSWfVkLFucUcJV4ue0QK4gtBFRz v+UV6wRG3gWMDKsYRVMLkguKk9JzDfWKE3OLS/PS9ZLzczcxgsPqmdQOxpUNFocYBTgYlXh4 DyxzDRZiTSwrrsw9xCjBwawkwst9wC1YiDclsbIqtSg/vqg0J7X4EKM0B4uSOO+BVutAIYH0 xJLU7NTUgtQimCwTB6dUA+NWn6WqLVLWfdMWLL47d2E8s1TZ9PvngmXFzfvLnv9TPaeUbClg OL1hq1RZxL2Qo1N7dv239+dp296Q+fl2OsvHkgka/Fd+5Cs3W90MSGxUzbIq2/F9rmeLycWd uo9VGibFOfB1L3n8wHmJQvVPTsnbAVFa09W9TYKYbwmpG+/JtTCefCWwX4mlOCPRUIu5qDgR AIs3NjgnAgAA Cc: w1.huang@samsung.com, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, julien.grall@linaro.org, jaeyong.yoo@samsung.com, yjhyun.yoo@samsung.com Subject: [Xen-devel] [PATCH 3/6] xen/arm: Implement 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.175 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 --- 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)