Message ID | 4659d20be8f27e40ef39adfa06b0c759c2d6cd78.1581721799.git.anchalag@amazon.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=bhav=4C=lists.xenproject.org=xen-devel-bounces@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 55D9892A for <patchwork-xen-devel@patchwork.kernel.org>; Fri, 14 Feb 2020 23:29:27 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3268B2086A for <patchwork-xen-devel@patchwork.kernel.org>; Fri, 14 Feb 2020 23:29:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="m0a62/lK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3268B2086A Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amazon.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from <xen-devel-bounces@lists.xenproject.org>) id 1j2kO2-0001cr-T7; Fri, 14 Feb 2020 23:28:42 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from <SRS0=R0dv=4C=amazon.com=prvs=306f93d76=anchalag@srs-us1.protection.inumbo.net>) id 1j2kO1-0001cb-UD for xen-devel@lists.xenproject.org; Fri, 14 Feb 2020 23:28:41 +0000 X-Inumbo-ID: b947132a-4f81-11ea-bb5b-12813bfff9fa Received: from smtp-fw-33001.amazon.com (unknown [207.171.190.10]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id b947132a-4f81-11ea-bb5b-12813bfff9fa; Fri, 14 Feb 2020 23:28:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1581722917; x=1613258917; h=date:from:to:subject:message-id:references:mime-version: in-reply-to; bh=XFd2LTl25ne3kMWrL/YPna7uVttvsKNxoFQR8TCvE9E=; b=m0a62/lKKLCqMlQYPcsCumDyvtuTauNQVD6L5UwkutcOiVZvd078XFM8 DlDNWxn5Xvj1kG7gqOKOJNpPw3+ZVsKfayPQd8MhIHUb68E8Jh42wok7P HOkZIEbFOF/8UjAerb3YePdKAakmk+Ikxw7g+Qo/HpVw3ZFOFQtqklxMz w=; IronPort-SDR: Uq4xL82dqRbjGX7NdFvnD6eSDrEZWhgkJv2ITzh9uXV0XvYsU1YnSahYNjBZ0qyDvhYKBxVhJc Teid1lqAMnhQ== X-IronPort-AV: E=Sophos;i="5.70,442,1574121600"; d="scan'208";a="26559030" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-1e-303d0b0e.us-east-1.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-33001.sea14.amazon.com with ESMTP; 14 Feb 2020 23:28:35 +0000 Received: from EX13MTAUEB002.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan3.iad.amazon.com [10.40.159.166]) by email-inbound-relay-1e-303d0b0e.us-east-1.amazon.com (Postfix) with ESMTPS id 3AFE1A23FF; Fri, 14 Feb 2020 23:28:27 +0000 (UTC) Received: from EX13D08UEB002.ant.amazon.com (10.43.60.107) by EX13MTAUEB002.ant.amazon.com (10.43.60.12) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 14 Feb 2020 23:28:07 +0000 Received: from EX13MTAUEA002.ant.amazon.com (10.43.61.77) by EX13D08UEB002.ant.amazon.com (10.43.60.107) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 14 Feb 2020 23:28:07 +0000 Received: from dev-dsk-anchalag-2a-9c2d1d96.us-west-2.amazon.com (172.22.96.68) by mail-relay.amazon.com (10.43.61.169) with Microsoft SMTP Server id 15.0.1236.3 via Frontend Transport; Fri, 14 Feb 2020 23:28:07 +0000 Received: by dev-dsk-anchalag-2a-9c2d1d96.us-west-2.amazon.com (Postfix, from userid 4335130) id 500DF4028E; Fri, 14 Feb 2020 23:28:07 +0000 (UTC) Date: Fri, 14 Feb 2020 23:28:07 +0000 From: Anchal Agarwal <anchalag@amazon.com> To: <tglx@linutronix.de>, <mingo@redhat.com>, <bp@alien8.de>, <hpa@zytor.com>, <x86@kernel.org>, <boris.ostrovsky@oracle.com>, <jgross@suse.com>, <linux-pm@vger.kernel.org>, <linux-mm@kvack.org>, <kamatam@amazon.com>, <sstabellini@kernel.org>, <konrad.wilk@oracle.com>, <roger.pau@citrix.com>, <axboe@kernel.dk>, <davem@davemloft.net>, <rjw@rjwysocki.net>, <len.brown@intel.com>, <pavel@ucw.cz>, <peterz@infradead.org>, <eduval@amazon.com>, <sblbir@amazon.com>, <anchalag@amazon.com>, <xen-devel@lists.xenproject.org>, <vkuznets@redhat.com>, <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <dwmw@amazon.co.uk>, <fllinden@amaozn.com>, <benh@kernel.crashing.org> Message-ID: <4659d20be8f27e40ef39adfa06b0c759c2d6cd78.1581721799.git.anchalag@amazon.com> References: <cover.1581721799.git.anchalag@amazon.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <cover.1581721799.git.anchalag@amazon.com> User-Agent: Mutt/1.5.21 (2010-09-15) Precedence: Bulk Subject: [Xen-devel] [RFC PATCH v3 12/12] PM / hibernate: update the resume offset on SNAPSHOT_SET_SWAP_AREA X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 List-Id: Xen developer discussion <xen-devel.lists.xenproject.org> List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-devel>, <mailto:xen-devel-request@lists.xenproject.org?subject=unsubscribe> List-Post: <mailto:xen-devel@lists.xenproject.org> List-Help: <mailto:xen-devel-request@lists.xenproject.org?subject=help> List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xenproject.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" <xen-devel-bounces@lists.xenproject.org> |
Series |
Enable PM hibernation on guest VMs
|
expand
|
diff --git a/kernel/power/user.c b/kernel/power/user.c index 77438954cc2b..d396e313cb7b 100644 --- a/kernel/power/user.c +++ b/kernel/power/user.c @@ -374,8 +374,12 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd, if (swdev) { offset = swap_area.offset; data->swap = swap_type_of(swdev, offset, NULL); - if (data->swap < 0) + if (data->swap < 0) { error = -ENODEV; + } else { + swsusp_resume_device = swdev; + swsusp_resume_block = offset; + } } else { data->swap = -1; error = -EINVAL;