x86/ACPI: fix S3 wakeup vector mapping
authorJan Beulich <jbeulich@suse.com>
Tue, 5 Jan 2021 12:09:55 +0000 (13:09 +0100)
committerHans van Kranenburg <hans@knorrie.org>
Wed, 13 Jul 2022 14:28:39 +0000 (15:28 +0100)
commit5cd1c625357e5ce5a311b3bad889c6caf9a455c7
tree1dc86c3776d9c9d48694e987b4292de560ace34b
parent7cf43a92153a7cf10e11c3f44d8ec6d02722c314
x86/ACPI: fix S3 wakeup vector mapping

Use of __acpi_map_table() here was at least close to an abuse already
before, but it will now consistently return NULL here. Drop the layering
violation and use set_fixmap() directly. Re-use of the ACPI fixmap area
is hopefully going to remain "fine" for the time being.

Add checks to acpi_enter_sleep(): The vector now needs to be contained
within a single page, but the ACPI spec requires 64-byte alignment of
FACS anyway. Also bail if no wakeup vector was determined in the first
place, in part as preparation for a subsequent relaxation change.

Fixes: 1c4aa69ca1e1 ("xen/acpi: Rework acpi_os_map_memory() and acpi_os_unmap_memory()")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
(cherry picked from commit 0f089bbf43ecce6f27576cb548ba4341d0ec46a8)

Gbp-Pq: Name 0043-x86-ACPI-fix-S3-wakeup-vector-mapping.patch
xen/arch/x86/acpi/boot.c
xen/arch/x86/acpi/power.c