hw/acpi: move "etc/system-states" fw_cfg file from PIIX4 to core
commite3845e7c47cc3eaf35305c9c0f9d55ca3840b49b
authorLaszlo Ersek <lersek@redhat.com>
Wed, 29 Apr 2015 13:20:15 +0000 (29 15:20 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 4 Jun 2015 09:25:42 +0000 (4 11:25 +0200)
treea20be18600cd7afe1f4194bd053ae2bc0441e03c
parent9a10bbb4e83b184faef6fa744396a6775283c0aa
hw/acpi: move "etc/system-states" fw_cfg file from PIIX4 to core

The acpi_pm1_cnt_init() core function is responsible for setting up the
register block that will ultimately react to S3 and S4 requests (see
acpi_pm1_cnt_write()). It makes sense to advertise this configuration to
the guest firmware via an easy to parse fw_cfg file (ACPI is too complex
for firmware to parse), and indeed PIIX4 does that. However, since
acpi_pm1_cnt_init() is not specific to PIIX4, neither should be the fw_cfg
file.

This patch makes "etc/system-states" appear on all chipsets modified in
the previous patch, not just PIIX4 (assuming they have fw_cfg at all).

RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1204696
Cc: Amit Shah <amit.shah@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Leon Alrae <leon.alrae@imgtec.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
hw/acpi/core.c
hw/acpi/piix4.c