From: Gleb Natapov Date: Tue, 7 Aug 2012 12:52:03 +0000 (+0300) Subject: reset PMBA and PMREGMISC PIIX4 registers. X-Git-Tag: v1.1.2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=219a7482ab5866c64fc5a815381737ef8cf77f63;p=thirdparty%2Fqemu.git reset PMBA and PMREGMISC PIIX4 registers. The bug causes Windows + OVMF hang after reboot since OVMF checks PMREGMISC to see if IO space is enabled and skip configuration if it is. Reviewed-by: Laszlo Ersek Signed-off-by: Gleb Natapov Signed-off-by: Anthony Liguori (cherry picked from commit 4d09d37c6aa9a02b44b1fdb6268820fab92499bd) Signed-off-by: Michael Roth --- diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c index 585da4e3eb9..7bc4e0dba1d 100644 --- a/hw/acpi_piix4.c +++ b/hw/acpi_piix4.c @@ -345,6 +345,9 @@ static void piix4_reset(void *opaque) pci_conf[0x5a] = 0; pci_conf[0x5b] = 0; + pci_conf[0x40] = 0x01; /* PM io base read only bit */ + pci_conf[0x80] = 0; + if (s->kvm_enabled) { /* Mark SMM as already inited (until KVM supports SMM). */ pci_conf[0x5B] = 0x02; @@ -384,8 +387,6 @@ static int piix4_pm_initfn(PCIDevice *dev) pci_conf[0x09] = 0x00; pci_conf[0x3d] = 0x01; // interrupt pin 1 - pci_conf[0x40] = 0x01; /* PM io base read only bit */ - /* APM */ apm_init(&s->apm, apm_ctrl_changed, s);