Received: from eggs.gnu.org ([208.118.235.92]:32903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UD3Q2-0004IE-LY for qemu-devel@nongnu.org; Tue, 05 Mar 2013 20:45:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UD3Py-0001la-DK for qemu-devel@nongnu.org; Tue, 05 Mar 2013 20:45:22 -0500 Received: from mail-qa0-f47.google.com ([209.85.216.47]:53584) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UD3Py-0001lJ-9J for qemu-devel@nongnu.org; Tue, 05 Mar 2013 20:45:18 -0500 Received: by mail-qa0-f47.google.com with SMTP id j8so2254595qah.20 for ; Tue, 05 Mar 2013 17:45:17 -0800 (PST) Date: Tue, 5 Mar 2013 20:45:15 -0500 From: Kevin O'Connor Message-ID: <20130306014515.GA12600@morn.localdomain> References: <1362499403-16514-1-git-send-email-pbonzini@redhat.com> <1362502791.32301.13.camel@i7.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1362502791.32301.13.camel@i7.infradead.org> Subject: Re: [Qemu-devel] [PATCH 4/3] wakeup: only reset the CPU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Woodhouse Cc: Paolo Bonzini , aliguori@us.ibm.com, lersek@redhat.com, qemu-devel@nongnu.org On Tue, Mar 05, 2013 at 04:59:51PM +0000, David Woodhouse wrote: > On Tue, 2013-03-05 at 17:03 +0100, Paolo Bonzini wrote: > > Resuming from suspend-to-RAM should not reset all devices. Only the > > CPU should get a reset signal. > > Hm... on reflection, I don't actually know if this is true. > > Perhaps we *should* reset all devices. After all, in a real machine > they'll all have been turned off and the RAM will have been in > self-refresh. Surely they have to be reset? > > So maybe we should *let* the i440FX PAM registers get reset to point to > ROM. And fix the firmware to *cope* with that, check to see if the > shadow RAM already holds an image of a started-up firmware with the > correct checksum, and jump back to it. > > That is: perhaps it's a *SeaBIOS* bug that suspend/resume doesn't work > if the PAM configuration is reset? On a real machine the firmware would query the available memory and its settings via the smbus and then program the memory controller. Programming the memory controller without accessing any memory is a non-trivial task. QEMU doesn't emulate this low-level hardware - nor does it even fully emulate the PAM registers. So, I think the question isn't what does real-hardware do (there's no gain to be had in emulating all of this). Instead, I think the question is - what makes the most sense. Given that the objective is to restore the memory image and reset everything else, I think it would be best for QEMU's S3resume to completely restore the memory image - including the PAM settings. -Kevin