mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
hvm: add ACPI power button for HVM
This patch adds the ACPI fixed hardware power button for HVM. It enables a graceful shutdown of a guest OS by direction of Dom0. (if a proper action for the power button is set inside the guest) usage: xm trigger <Domain> power Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
This commit is contained in:
1 parent
48fe42ec0b
commit
ab438874b6
6 files changed
+34
-12
No files matched your search
@@ -105,13 +105,15 @@ LAST_SHUTDOWN_REASON = 'xend/last_shutdown_reason'
|
||||
TRIGGER_NMI = 0
|
||||
TRIGGER_RESET = 1
|
||||
TRIGGER_INIT = 2
|
||||
TRIGGER_S3RESUME = 3
|
||||
TRIGGER_POWER = 3
|
||||
TRIGGER_S3RESUME = 4
|
||||
|
||||
TRIGGER_TYPE = {
|
||||
"nmi" : TRIGGER_NMI,
|
||||
"reset" : TRIGGER_RESET,
|
||||
"init" : TRIGGER_INIT,
|
||||
"s3resume": TRIGGER_S3RESUME
|
||||
"s3resume": TRIGGER_S3RESUME,
|
||||
"power": TRIGGER_POWER
|
||||
}
|
||||
|
||||
#
|
||||
|
||||
@@ -151,7 +151,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|s3resume> [<VCPU>]',
|
||||
'trigger' : ('<Domain> <nmi|reset|init|s3resume|power> [<VCPU>]',
|
||||
'Send a trigger to a domain.'),
|
||||
'vcpu-list' : ('[Domain, ...]',
|
||||
'List the VCPUs for all/some domains.'),
|
||||
|
||||