[PULL][jammy:linux-aws] aws: Support hibernation on Graviton

Philip Cox philip.cox at canonical.com
Wed May 8 17:24:05 UTC 2024


SRU Justification:

BugLink: https://bugs.launchpad.net/bugs/2060992

[Impact]
This change contains two parts, the first is adding support for
  - KVM and guest support for the PSCI SYSTEM_OFF2 (hibernate) call

And the second part is:
   - Guest kernel support for clean boot on demand

For KVM and guest support for the PSCI SYSTEM_OFF2 (hibernate) call:

PSCI v1.3 adds support for SYSTEM_OFF2 which is analogous to ACPI S4
state.

This will allow hosting environments to determine that a guest is
hibernated rather than just powered off, and ensure that they preserve
the virtual environment appropriately to allow the guest to resume
safely (or bump the hardware_signature in the FACS to trigger a clean
reboot instead).

For Guest kernel support for clean boot on demand:

The FACS field in the ACPI table is optional, but can be used
communicate the hardware_signature field. If this field changes on
resuming from a hibernation a clean reboot should happen rather than
the resume from hibernation.

On hardware reduced platforms[0] this field may exist but it is not
exposed currently.

[Fix]

The changes for KVM and guest support for the PSCI SYSTEM_OFF2
(hibernate) call come from:
    
https://lore.kernel.org/lkml/20240312135958.727765-1-dwmw2@infradead.org

The changes for Guest kernel support for clean boot on demand come
from:
     
https://lore.kernel.org/lkml/20240312134148.727454-1-dwmw2@infradead.org

Latest patches have been picked from:
   - noble/mantic:
https://git.infradead.org/users/dwmw2/linux.git/shortlog/refs/heads/psci-hibernate-6.8

    - jammy:
https://git.infradead.org/users/dwmw2/linux.git/shortlog/refs/heads/psci-hibernate-5.15

[Test Plan]
AWS test.

[Where problems could occur]
If on hardware reduced platforms that incorrectly support/advertise the
FACS field, hibernation may break if it returns a hardware signature
that changes.

[Other info]
SF# 00383181

[0]: See Section 4.1 of the ACPI spec for info on hardware-reduced
platforms.
https://uefi.org/htmlspecs/ACPI_Spec_6_4_html/04_ACPI_Hardware_Specification/ACPI_Hardware_Specification.html

----------------------------------------------------------------


The following changes since commit
b51d72c21a3c3bb74be5ddc2ef7aeb81a388f3b4:

  UBUNTU: Ubuntu-aws-5.15.0-1062.68 (2024-04-30 14:50:12 -0400)

are available in the Git repository at:

  git+ssh://philcox@git.launchpad.net/~philcox/+git/aws-jammy
philcox/sf00383181-lp2061006-support-PSCI-SYSTEM_OFF2

for you to fetch changes up to
0244d32caacb1326be8bfe38bd78d3beccaad9d5:

  UBUNTU: [Config]: Enable hibernate on arm64 (2024-05-08 11:32:53 -
0400)

----------------------------------------------------------------
David Woodhouse (6):
      UBUNTU: SAUCE: PM: hibernate: Allow ACPI hardware signature to be
honoured
      UBUNTU: SAUCE: PM: hibernate: Honour ACPI hardware signature by
default for virtual guests
      UBUNTU: SAUCE: ACPICA: Detect FACS even for hardware reduced
platforms
      UBUNTU: SAUCE: arm64: acpi: Honour firmware_signature field of
FACS, if it exists
      UBUNTU: SAUCE: firmware/psci: Add definitions for PSCI v1.3
specification (ALPHA)
      UBUNTU: SAUCE: arm64: Use SYSTEM_OFF2 PSCI call to power off for
hibernate

Philip Cox (1):
      UBUNTU: [Config]: Enable hibernate on arm64

 arch/arm64/kernel/acpi.c      | 10 ++++++++++
 debian.aws/config/annotations | 18 ++++++++++++++++++
 drivers/acpi/acpica/tbfadt.c  | 30 +++++++++++++-----------------
 drivers/acpi/acpica/tbutils.c |  7 +------
 drivers/firmware/psci/psci.c  | 39
+++++++++++++++++++++++++++++++++++++++
 include/uapi/linux/psci.h     | 27 +++++++++++++++++++++++++++
 kernel/power/hibernate.c      |  5 ++++-
 7 files changed, 112 insertions(+), 24 deletions(-)



More information about the kernel-team mailing list