ich9: add disable_s3, disable_s4, s4_val properties
authorAmit Shah <amit.shah@redhat.com>
Mon, 12 Jan 2015 12:00:14 +0000 (17:30 +0530)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 26 Jan 2015 18:25:52 +0000 (20:25 +0200)
commit6ac0d8d44c0966225b200cc25f8c5270f1191ec0
tree0a753c8dcb4abf0ea3bdb6c532496f742cc22452
parent1e42c353469cb58ca4f3b450eea4211af7d0b147
ich9: add disable_s3, disable_s4, s4_val properties

PIIX4 has disable_s3 and disable_s4 properties to enable or disable PM
functions.  Add such properties to the ICH9 chipset as well for the Q35
machine type.

S3 / S4 are not guaranteed to always work (needs work in the guest as
well as QEMU for things to work properly), and disabling advertising of
these features ensures guests don't go into zombie state if something
isn't working right.

The defaults are kept the same as in PIIX4: both S3 and S4 are enabled
by default.

These can be disabled via the cmdline:

  ... -global ICH9-LPC.disable_s3=1 -global ICH9-LPC.disable_s4=1

Note: some guests can fake hibernation by writing a hibernate image and
doing a shutdown instead of S4 if S4 isn't available; there's nothing we
can do guests to stop doing this, and this patch can't affect that
functionality.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
hw/acpi/ich9.c
include/hw/acpi/ich9.h