From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43122) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqhbN-0006x9-L6 for qemu-devel@nongnu.org; Wed, 11 Dec 2013 06:05:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VqhbI-0007Qr-Jl for qemu-devel@nongnu.org; Wed, 11 Dec 2013 06:05:13 -0500 Date: Wed, 11 Dec 2013 06:04:57 -0500 (EST) From: Gal Hammer Message-ID: <42164188.5113689.1386759897161.JavaMail.root@redhat.com> In-Reply-To: <20131211104437.GD9547@redhat.com> References: <1386753670-11238-1-git-send-email-ghammer@redhat.com> <52A83D1F.8060103@redhat.com> <20131211104437.GD9547@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] piix: do not reset APIC base address (0x80) on piix4_reset. Reply-To: Gal Hammer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Paolo Bonzini , qemu-devel@nongnu.org, qemu-stable@nongnu.org Michael, True, I haven't figure it out yet, but the current status is that recover from sleep doesn't work. As far as I can tell it could be either: 1. piix4_reset shouldn't be call on resume. 2. memory_region_set_enabled (called in pm_io_space_update) shouldn't use config[0x80]. 3. the config[0x80] shouldn't be zero in piix4_reset (current solution). 4. something else? I'm not well familiar with the PIIX4 emulation and your help will be appreciated. Thanks, Gal. ----- Original Message ----- From: "Michael S. Tsirkin" To: "Paolo Bonzini" Cc: "Gal Hammer" , qemu-devel@nongnu.org, qemu-stable@nongnu.org Sent: Wednesday, December 11, 2013 12:44:37 PM Subject: Re: [PATCH] piix: do not reset APIC base address (0x80) on piix4_reset. On Wed, Dec 11, 2013 at 11:23:27AM +0100, Paolo Bonzini wrote: > Il 11/12/2013 10:21, Gal Hammer ha scritto: > > Fix a bug that was introduced in commit c046e8c4. QEMU fails to > > resume from suspend mode (S3). > > > > Signed-off-by: Gal Hammer > > --- > > hw/acpi/piix4.c | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c > > index 93849c8..5c736a4 100644 > > --- a/hw/acpi/piix4.c > > +++ b/hw/acpi/piix4.c > > @@ -376,7 +376,6 @@ static void piix4_reset(void *opaque) > > 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). */ > > > > Cc: qemu-stable@nongnu.org It's good to know this helps but I don't think we can apply it as is without figuring out why, otherwise it might break something else. -- MST