qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin O'Connor <kevin@koconnor.net>
To: David Woodhouse <dwmw2@infradead.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	aliguori@us.ibm.com, lersek@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 4/3] wakeup: only reset the CPU
Date: Tue, 5 Mar 2013 20:45:15 -0500	[thread overview]
Message-ID: <20130306014515.GA12600@morn.localdomain> (raw)
In-Reply-To: <1362502791.32301.13.camel@i7.infradead.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

  parent reply	other threads:[~2013-03-06  1:45 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-05 15:04 [Qemu-devel] [PATCH 0/3] Implement x86 soft reset Paolo Bonzini
2013-03-05 15:04 ` [Qemu-devel] [PATCH 1/3] cpu: make CPU_INTERRUPT_RESET available on all targets Paolo Bonzini
2013-03-05 15:38   ` Anthony Liguori
2013-03-05 16:10     ` Andreas Färber
2013-03-05 16:17       ` Paolo Bonzini
2013-03-05 18:00   ` Laszlo Ersek
2013-03-05 15:04 ` [Qemu-devel] [PATCH 2/3] pc: port 92 reset requires a low->high transition Paolo Bonzini
2013-03-05 17:20   ` Anthony Liguori
2013-03-05 18:05   ` Laszlo Ersek
2013-03-05 15:04 ` [Qemu-devel] [PATCH 3/3] hw: correctly implement soft reset Paolo Bonzini
2013-03-05 17:18   ` Anthony Liguori
2013-03-05 17:22   ` David Woodhouse
2013-03-05 17:43     ` Paolo Bonzini
2013-03-05 18:32   ` Laszlo Ersek
2013-03-05 15:51 ` [Qemu-devel] [PATCH 0/3] Implement x86 " David Woodhouse
2013-03-05 16:00   ` Paolo Bonzini
2013-03-05 16:13     ` Andreas Färber
2013-03-05 16:03 ` [Qemu-devel] [PATCH 4/3] wakeup: only reset the CPU Paolo Bonzini
2013-03-05 16:59   ` David Woodhouse
2013-03-05 17:10     ` Paolo Bonzini
2013-03-05 17:26       ` Peter Stuge
2013-03-05 17:42         ` Paolo Bonzini
2013-03-05 19:12     ` Laszlo Ersek
2013-03-05 19:25       ` Paolo Bonzini
2013-03-05 19:51         ` Laszlo Ersek
2013-03-06  1:45     ` Kevin O'Connor [this message]
2013-03-06  8:32       ` David Woodhouse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130306014515.GA12600@morn.localdomain \
    --to=kevin@koconnor.net \
    --cc=aliguori@us.ibm.com \
    --cc=dwmw2@infradead.org \
    --cc=lersek@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).