[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] xend: Support HVM S3 resume.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1211291445 -3600
# Node ID 672c09aad49df0b8056c795bd6c351746d037975
# Parent  7c752689b0eaeff1cc68e39931040d0bda04aa25
xend: Support HVM S3 resume.
Signed-off-by: Yu Ke <ke.yu@xxxxxxxxx>
Signed-off-by: Ke Liping <liping.ke@xxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/python/xen/xend/XendConstants.py |    5 ++++-
 tools/python/xen/xend/XendDomain.py    |    3 +++
 tools/python/xen/xm/main.py            |    2 +-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff -r 7c752689b0ea -r 672c09aad49d tools/python/xen/xend/XendConstants.py
--- a/tools/python/xen/xend/XendConstants.py    Tue May 20 14:36:05 2008 +0100
+++ b/tools/python/xen/xend/XendConstants.py    Tue May 20 14:50:45 2008 +0100
@@ -48,6 +48,7 @@ HVM_PARAM_BUFPIOREQ_PFN = 9
 HVM_PARAM_BUFPIOREQ_PFN = 9
 HVM_PARAM_TIMER_MODE   = 10
 HVM_PARAM_HPET_ENABLED = 11
+HVM_PARAM_ACPI_S_STATE = 14
 
 restart_modes = [
     "restart",
@@ -102,11 +103,13 @@ TRIGGER_NMI   = 0
 TRIGGER_NMI   = 0
 TRIGGER_RESET = 1
 TRIGGER_INIT  = 2
+TRIGGER_S3RESUME = 3
 
 TRIGGER_TYPE = {
     "nmi"   : TRIGGER_NMI,
     "reset" : TRIGGER_RESET,
-    "init"  : TRIGGER_INIT
+    "init"  : TRIGGER_INIT,
+    "s3resume": TRIGGER_S3RESUME
 }
 
 #
diff -r 7c752689b0ea -r 672c09aad49d tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Tue May 20 14:36:05 2008 +0100
+++ b/tools/python/xen/xend/XendDomain.py       Tue May 20 14:50:45 2008 +0100
@@ -1657,6 +1657,9 @@ class XendDomain:
             trigger = TRIGGER_TYPE[trigger_name.lower()]
         else:
             raise XendError("Invalid trigger: %s" % trigger_name)
+        if trigger == TRIGGER_S3RESUME:
+            xc.hvm_set_param(dominfo.getDomid(), HVM_PARAM_ACPI_S_STATE, 0)
+            return None
         try:
             return xc.domain_send_trigger(dominfo.getDomid(),
                                           trigger,
diff -r 7c752689b0ea -r 672c09aad49d tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Tue May 20 14:36:05 2008 +0100
+++ b/tools/python/xen/xm/main.py       Tue May 20 14:50:45 2008 +0100
@@ -143,7 +143,7 @@ SUBCOMMAND_HELP = {
                      'Get/set credit scheduler parameters.'),
     'sysrq'       : ('<Domain> <letter>', 'Send a sysrq to a domain.'),
     'debug-keys'  : ('<Keys>', 'Send debug keys to Xen.'),
-    'trigger'     : ('<Domain> <nmi|reset|init> [<VCPU>]',
+    'trigger'     : ('<Domain> <nmi|reset|init|s3resume> [<VCPU>]',
                      'Send a trigger to a domain.'),
     'vcpu-list'   : ('[Domain, ...]',
                      'List the VCPUs for all/some domains.'),

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.