]> git.baikalelectronics.ru Git - kernel.git/commit
PM: hibernate: Honour ACPI hardware signature by default for virtual guests
authorDavid Woodhouse <dwmw@amazon.co.uk>
Fri, 11 Mar 2022 19:20:17 +0000 (19:20 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 16 Mar 2022 18:29:32 +0000 (19:29 +0100)
commit92fae1044d3a0332c6c5488b41ab0d49c90d92e5
tree0cde7c4c4268fa79333c5def36eecc6cb3dbf3a3
parent51733d63a2c59daee3d0f318e9c1d38a73b2ce3c
PM: hibernate: Honour ACPI hardware signature by default for virtual guests

The ACPI specification says that OSPM should refuse to restore from
hibernate if the hardware signature changes, and should boot from
scratch. However, real BIOSes often vary the hardware signature in cases
where we *do* want to resume from hibernate, so Linux doesn't follow the
spec by default.

However, in a virtual environment there's no reason for the VMM to vary
the hardware signature *unless* it wants to trigger a clean reboot as
defined by the ACPI spec. So enable the check by default if a hypervisor
is detected.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
arch/x86/kernel/acpi/sleep.c
drivers/acpi/sleep.c
include/linux/acpi.h