acpi: initialize s4_val used in s4 shutdown
PATCH 1/1 acpi: initialize s4_val used in s4 shutdown
While investigating why a 32 bit Windows 2003 guest wasn't able to successfully perform a shutdown /h, it was discovered that commit afafe4bbe0cf7d3318e1ac7b40925561f86a6bd4 inadvertently dropped the initialization of the s4_val used to handle s4 shutdown. Initialize the value as before.
--- hw/acpi.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
hw/acpi.c +1 -0
@@ -474,6 +474,7 @@ static const MemoryRegionOps acpi_pm_cnt_ops = {void acpi_pm1_cnt_init (ACPIREGS *ar,MemoryRegion *parent) { + ar->pm1.cnt.s4_val =2 ; ar->wakeup.notify = acpi_notify_wakeup;qemu_register_wakeup_notifier (&ar->wakeup);memory_region_init_io (&ar->pm1.cnt.io, &acpi_pm_cnt_ops, ar,"acpi-cnt" ,2 );
Signature · 1 line
1.7.7
hw/acpi.c static const MemoryRegionOps acpi_pm_cnt_ops = { · line 477
Quoted 13 lines · Bruce Rogers
While investigating why a 32 bit Windows 2003 guest wasn't able to successfully perform a shutdown /h, it was discovered that commit
afafe4bbe0cf7d3318e1ac7b40925561f86a6bd4inadvertently dropped the initialization of thes4_valused to handle s4 shutdown. Initialize the value as before.hw/acpi.c +1
-0@@ -474,6 +474,7 @@ static const MemoryRegionOps acpi_pm_cnt_ops = {void acpi_pm1_cnt_init (ACPIREGS *ar,MemoryRegion *parent) { + ar->pm1.cnt.s4_val =2 ;
The '2' used to come from PIIX4PMState->s4_val before commit afafe4bbe0cf7d3318e1ac7b40925561f86a6bd4, see piix4_pm_properties, this behavior should be maintained IMHO.
cheers,
Gerd
Quoted 12 lines
Quoted 1 line
Quoted 1 line · Gerd Hoffmann
Quoted 10 lines · Bruce Rogers
While investigating why a 32 bit Windows 2003 guest wasn't able to successfully perform a shutdown /h, it was discovered that commit
afafe4bbe0cf7d3318e1ac7b40925561f86a6bd4inadvertently dropped the initialization of thes4_valused to handle s4 shutdown. Initialize the value as before.hw/acpi.c +0
-0@@ -474,6 +474,7 @@ static const MemoryRegionOps acpi_pm_cnt_ops = {
Quoted 7 lines
hw/acpi.c static const MemoryRegionOps acpi_pm_cnt_ops = { · line 477
Quoted 3 lines
hw/acpi.c +1
-0void acpi_pm1_cnt_init (ACPIREGS *ar,MemoryRegion *parent) { + ar->pm1.cnt.s4_val =2 ;The '2' used to come from
PIIX4PMState->s4_valbefore commitafafe4bbe0cf7d3318e1ac7b40925561f86a6bd4, seepiix4_pm_properties, this behavior should be maintained IMHO.
OK, I'll send out another patch with another parameter to acpi_pm1_cnt_init to use to init the s4 value, pass in PIIX4PMState->s4_val for the piix4 case, and simply pass a 2 in the ich9 and vt82c686 cases then. It looks like ich9 and vt82c686 are not fully set up for doing s4 shutdown from what I can see.
Bruce