From patchwork Sat Mar 12 05:07:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shriram Rajagopalan X-Patchwork-Id: 629851 Received: from smtp1.linux-foundation.org (smtp1.linux-foundation.org [140.211.169.13]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2C5BcI3014841 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Sat, 12 Mar 2011 05:11:58 GMT Received: from daredevil.linux-foundation.org (localhost [127.0.0.1]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id p2C59vxq020954; Fri, 11 Mar 2011 21:09:58 -0800 Received: from athos.nss.cs.ubc.ca ([198.162.52.240]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id p2C57iZ7020686 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 11 Mar 2011 21:07:45 -0800 Received: from athos.nss.cs.ubc.ca (localhost [127.0.0.1]) by athos.nss.cs.ubc.ca (8.14.3/8.14.3/Debian-9.1ubuntu1) with ESMTP id p2C57gKM031003; Fri, 11 Mar 2011 21:07:42 -0800 Received: (from root@localhost) by athos.nss.cs.ubc.ca (8.14.3/8.14.3/Submit) id p2C57gL1031000; Fri, 11 Mar 2011 21:07:42 -0800 From: Shriram Rajagopalan To: xen-devel@lists.xensource.com Date: Fri, 11 Mar 2011 21:07:27 -0800 Message-Id: <1299906447-30969-1-git-send-email-rshriram@cs.ubc.ca> X-Mailer: git-send-email 1.7.0.4 Received-SPF: pass (localhost is always allowed.) X-Spam-Status: No, hits=-3.533 required=5 tests=AWL, BAYES_00, OSDL_HEADER_SUBJECT_BRACKETED, RDNS_NONE X-Spam-Checker-Version: SpamAssassin 3.2.4-osdl_revision__1.47__ X-MIMEDefang-Filter: lf$Revision: 1.188 $ X-Scanned-By: MIMEDefang 2.63 on 140.211.169.21 Cc: Shriram Rajagopalan , linux-pm@lists.linux-foundation.org Subject: [linux-pm] [PATCH v3 3/5] PM: pm.h - Add comments about Xen save/restore/chkpt use case X-BeenThere: linux-pm@lists.linux-foundation.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux power management List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sat, 12 Mar 2011 05:11:58 +0000 (UTC) diff --git a/include/linux/pm.h b/include/linux/pm.h index 6618216..ad33d21 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h @@ -526,6 +526,25 @@ struct dev_power_domain { * well as during system sleep states like PM_SUSPEND_STANDBY. They may * be able to use wakeup events to exit from runtime low-power states, * or from system low-power states such as standby or suspend-to-RAM. + * + * Xen Guest Kernels use PM_FREEZE, PM_RESTORE and PM_THAW to implement + * VM save/restore/checkpoint functionality. Save and Restore are somewhat + * similar to hibernate functionality. The sequence of events is shown below: + * dpm_suspend_start(PMSG_FREEZE); + * + * dpm_suspend_noirq(PMSG_FREEZE); + * + * sysdev_suspend(PMSG_FREEZE); + * cancelled = suspend_hypercall() + * sysdev_resume(); + * + * dpm_resume_noirq(cancelled ? PMSG_THAW : PMSG_RESTORE); + * + * dpm_resume_end(cancelled ? PMSG_THAW : PMSG_RESTORE); + * + * If the syspend_hypercall returns 1, it means that the VM was merely + * checkpointed (akin to THAW). If it returns 0, it means the system has been + * fully restored from its on-disk snapshot (akin to RESTORE). */ #ifdef CONFIG_PM_SLEEP