I get reliable suspend and resume with this series. Tested the X64 and
the Ia32X64 builds, with an X64 Fedora 19 guest. Nothing seems to be
corrupted, X11 makes no difference wrt. stability. The guest even
withstands repeated suspends and resumes in a row. Ssh connections to
the guest via virtio-net survive the suspend/resume intact. The display
does die, but that's something to be figured out later -- it might
involve guest kernel debugging.

I also tracked/eyeballed a bunch of interesting pointers in the logs
(OVMF's and the Linux EFI memmap dump), from cold boot to resume,
verifying types and ranges.

Changes in this version, in comparison to rfc2:

- Introduced EmuNvramLib which simply describes three separate address
  ranges that we need to survive suspend / resume. The address ranges
  are: SMRAM (for SMM / LockBox stuff), storage for the SMST pointer,
  and backing store for permanent PEI core memory on the resume path.

- Following Jiewen's advice, implemented the correct lifecycle for
  permanent PEI core memory on the resume path. This proved critical in
  avoiding guest OS corruption. It also allowed me to drop several
  patches, MdeModulePkg and UefiCpuPkg included, that had approached
  this from the wrong side.

- Reordered patches so that PlatformPei / memory reservation ones
  gravitate to the beginning of the series. "S3 Suspend" and "S3 Resume"
  patches are about drivers.

- Added Jiewen's R-b to the UefiCpuPkg patch.

- Replicated the FDF and DSC changes to the 32 and 32/64 platforms
  throughout.

The series should not regress any use pattern that lacks suspend/resume.

Please test and/or review.
Thanks!
Laszlo

Laszlo Ersek (22):
  OvmfPkg: introduce EmuNvramLib
  OvmfPkg: Sec: forbid overlap between decompressed fw image and
    EmuNvram
  OvmfPkg: PlatformPei: simplify memory range expressions in MemDetect()
  OvmfPkg: PlatformPei: reuse PublishPeiMemory() in MemDetect()
  OvmfPkg: PlatformPei: reserve / install PEI core memory dependent on
    S3
  OvmfPkg: PlatformPei: reserve decompressed firmware area from the OS
  OvmfPkg: PlatformPei: reserve fw decompression scratch space from the
    OS
  OvmfPkg: PlatformPei: reserve initial (pre-migr.) SEC/PEI stack and
    PEI heap
  OvmfPkg: S3 Suspend: introduce EmuSmmDxe for exposing SMRAM
  OvmfPkg: S3 Suspend: pull in DXE driver for
    EFI_SMM_COMMUNICATION_PROTOCOL
  OvmfPkg: S3 Suspend: pull in SmmLockBox driver
  OvmfPkg: S3 Suspend: use SMM instances for LockBoxLib library class
  OvmfPkg: S3 Suspend: import specialized copy of AcpiS3SaveDxe
  OvmfPkg: S3 Suspend: save ACPI context
  OvmfPkg: S3 Suspend: enable creation/saving of an S3 Boot Script
  OvmfPkg: S3 Suspend: save boot script after ACPI context
  OvmfPkg: S3 Suspend: introduce DiscloseSmstSmm driver
  OvmfPkg: S3 Resume: introduce EmuSmmPei for exposing SMRAM in PEI
  OvmfPkg: S3 Resume: pull in BootScriptExecutorDxe
  UefiCpuPkg: S3Resume2Pei: align return stacks explicitly
  OvmfPkg: S3 Resume: pull in PEIM orchestrating S3 Resume
  OvmfPkg: PlatformPei: detect S3 Resume in CMOS and set boot mode
    accordingly

 OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf           |  78 +++
 OvmfPkg/DiscloseSmstSmm/DiscloseSmstSmm.inf       |  50 ++
 OvmfPkg/EmuSmmDxe/EmuSmmDxe.inf                   |  54 ++
 OvmfPkg/EmuSmmPei/EmuSmmPei.inf                   |  57 ++
 OvmfPkg/Library/EmuNvramLib/EmuNvramLib.inf       |  42 ++
 OvmfPkg/PlatformPei/PlatformPei.inf               |   1 +
 OvmfPkg/Sec/SecMain.inf                           |   1 +
 OvmfPkg/AcpiS3SaveDxe/AcpiS3Save.h                |  59 +++
 OvmfPkg/Include/Library/EmuNvramLib.h             |  32 ++
 OvmfPkg/PlatformPei/Platform.h                    |   6 +-
 OvmfPkg/AcpiS3SaveDxe/AcpiS3Save.c                | 605 ++++++++++++++++++++++
 OvmfPkg/DiscloseSmstSmm/DiscloseSmstSmm.c         |  36 ++
 OvmfPkg/EmuSmmDxe/EmuSmmDxe.c                     | 277 ++++++++++
 OvmfPkg/EmuSmmPei/EmuSmmPei.c                     | 280 ++++++++++
 OvmfPkg/Library/EmuNvramLib/EmuNvramLib.c         | 138 +++++
 OvmfPkg/PlatformPei/Fv.c                          |  42 +-
 OvmfPkg/PlatformPei/MemDetect.c                   |  55 +-
 OvmfPkg/PlatformPei/Platform.c                    |  21 +-
 OvmfPkg/Sec/SecMain.c                             |   6 +
 UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c |  14 +-
 OvmfPkg/OvmfPkg.dec                               |   8 +
 OvmfPkg/OvmfPkgIa32.dsc                           |  44 +-
 OvmfPkg/OvmfPkgIa32.fdf                           |  26 +
 OvmfPkg/OvmfPkgIa32X64.dsc                        |  44 +-
 OvmfPkg/OvmfPkgIa32X64.fdf                        |  26 +
 OvmfPkg/OvmfPkgX64.dsc                            |  44 +-
 OvmfPkg/OvmfPkgX64.fdf                            |  26 +
 27 files changed, 2025 insertions(+), 47 deletions(-)
 create mode 100644 OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf
 create mode 100644 OvmfPkg/DiscloseSmstSmm/DiscloseSmstSmm.inf
 create mode 100644 OvmfPkg/EmuSmmDxe/EmuSmmDxe.inf
 create mode 100644 OvmfPkg/EmuSmmPei/EmuSmmPei.inf
 create mode 100644 OvmfPkg/Library/EmuNvramLib/EmuNvramLib.inf
 create mode 100644 OvmfPkg/AcpiS3SaveDxe/AcpiS3Save.h
 create mode 100644 OvmfPkg/Include/Library/EmuNvramLib.h
 create mode 100644 OvmfPkg/AcpiS3SaveDxe/AcpiS3Save.c
 create mode 100644 OvmfPkg/DiscloseSmstSmm/DiscloseSmstSmm.c
 create mode 100644 OvmfPkg/EmuSmmDxe/EmuSmmDxe.c
 create mode 100644 OvmfPkg/EmuSmmPei/EmuSmmPei.c
 create mode 100644 OvmfPkg/Library/EmuNvramLib/EmuNvramLib.c

-- 
1.8.3.1


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to