qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Sebastian Herbszt <herbszt@gmx.de>
Cc: bochs-developers@lists.sourceforge.net, qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [Bochs-developers] [PATCH v4 2/5] Preserve memory content duringSMM init.
Date: Tue, 18 Nov 2008 09:46:28 +0200	[thread overview]
Message-ID: <20081118074628.GC11066@redhat.com> (raw)
In-Reply-To: <6BBD568AF57A42CE81244D009F97923C@FSCPC>

On Tue, Nov 18, 2008 at 12:51:17AM +0100, Sebastian Herbszt wrote:
> smm_init() is currently only run on VM start and overwriting
> memory is not an issue there. This would matter on S3 resume,
> but smm_init() is not run there. It is only run from pci_bios_init(),
> but on S3 resume we bail out from rombios32.c before this call.
> Your patch to handle S3 in qemu does use qemu_system_reset_request()
> which does reset some emulated devices. Since piix4_pm does not
> register a reset handler it is not reset. I assume the reset on S3 resume
> is a hardware reset and the state of piix4_pm should be reset too, right?
S3 removes power from all devices except memory, so yes, piix4_pm should
be reset to its power up state.

> cpu_reset() in target-i386/helper.c does set smbase to 0x30000. Since the
> piix4_pm state is not lost, APMC_EN is still set and even on a normal reset
> SMBASE is not relocated. If i don't mistake smm_init() should be run on S3
> resume and we would need something like
>
> pci_for_each_device(find_piix4pm)
> if (piix4pm_pcidev)
>    smm_init();
>
> in the resume path in rombios32.c.
>
Yes, you are right. I'll add it.

--
			Gleb.

  reply	other threads:[~2008-11-18  7:46 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-16  9:33 [Qemu-devel] [PATCH v4 0/5] Support for S3 ACPI state (suspend to memory) in BIOS Gleb Natapov
2008-11-16  9:33 ` [Qemu-devel] [PATCH v4 1/5] Add S3 state to DSDT. Handle resume event in the BIOS Gleb Natapov
2008-11-16 10:50   ` Blue Swirl
2008-11-16 11:01     ` Gleb Natapov
2008-11-16 11:11       ` Blue Swirl
2008-11-16 11:15         ` Gleb Natapov
2008-11-16 17:54       ` [Bochs-developers] [Qemu-devel] [PATCH v4 1/5] Add S3 state toDSDT. " Sebastian Herbszt
2008-11-16 18:01         ` Gleb Natapov
2008-11-17 23:07           ` [Bochs-developers] [Qemu-devel] [PATCH v4 1/5] Add S3 statetoDSDT. " Sebastian Herbszt
2008-11-16  9:33 ` [Qemu-devel] [PATCH v4 2/5] Preserve memory content during SMM init Gleb Natapov
2008-11-17 23:51   ` [Qemu-devel] Re: [Bochs-developers] [PATCH v4 2/5] Preserve memory content duringSMM init Sebastian Herbszt
2008-11-18  7:46     ` Gleb Natapov [this message]
2008-11-18  8:27       ` Gleb Natapov
2008-11-23 21:15         ` [Qemu-devel] Re: [Bochs-developers] [PATCH v4 2/5] Preserve memory contentduringSMM init Sebastian Herbszt
2008-11-24  7:35           ` Gleb Natapov
2008-11-16  9:34 ` [Qemu-devel] [PATCH v4 3/5] Execute rombios32 code from rom address 0xe0000 Gleb Natapov
2008-11-16  9:34 ` [Qemu-devel] [PATCH v4 4/5] Don't use unreserved memory in BIOS Gleb Natapov
2008-11-16  9:34 ` [Qemu-devel] [PATCH v4 5/5] Don't power down vga card on entering S3 state Gleb Natapov
2008-11-16 17:35 ` [Qemu-devel] Re: [Bochs-developers] [PATCH v4 0/5] Support for S3 ACPI state(suspend to memory) in BIOS Sebastian Herbszt
2008-11-16 17:38   ` Gleb Natapov

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=20081118074628.GC11066@redhat.com \
    --to=gleb@redhat.com \
    --cc=bochs-developers@lists.sourceforge.net \
    --cc=herbszt@gmx.de \
    --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).