From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45339) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SyjGe-0006rR-EA for qemu-devel@nongnu.org; Tue, 07 Aug 2012 08:52:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SyjGY-0005em-KL for qemu-devel@nongnu.org; Tue, 07 Aug 2012 08:52:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44269) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SyjGY-0005eg-Bs for qemu-devel@nongnu.org; Tue, 07 Aug 2012 08:52:06 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q77Cq5Q1032097 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 7 Aug 2012 08:52:05 -0400 Date: Tue, 7 Aug 2012 15:52:03 +0300 From: Gleb Natapov Message-ID: <20120807125203.GC3341@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] reset PMBA and PMREGMISC PIIX4 registers. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: lersek@redhat.com 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. Signed-off-by: Gleb Natapov diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c index 0aace60..90b46b5 100644 --- a/hw/acpi_piix4.c +++ b/hw/acpi_piix4.c @@ -353,6 +353,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; @@ -392,8 +395,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); -- Gleb.