xend: Support HVM S3 resume.

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Ke Liping <liping.ke@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
This commit is contained in:
Keir Fraser committed 2008-05-20 14:50:45 +01:00
1 parent 232cae0f1c
commit 306921aa6f
3 files changed
+8 -2

No files matched your search

+4 -1
View File
@@ -48,6 +48,7 @@ HVM_PARAM_VHPT_SIZE = 8
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 @@ LAST_SHUTDOWN_REASON = 'xend/last_shutdown_reason'
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
}
#
+3
View File
@@ -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,
+1 -1
View File
@@ -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.'),
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.