hvmloader: flip "ACPI data" to "ACPI NVS" type for ACPI table region
authorIgor Druzhinin <igor.druzhinin@citrix.com>
Tue, 20 Oct 2020 06:54:23 +0000 (08:54 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 20 Oct 2020 06:54:23 +0000 (08:54 +0200)
commitde6d188a519f9e3b7a1acc7784adf4c243865f9a
treefe50c66193ec02e43b5e2a32157914d5aa803e20
parent7b36d16d21ae70a1eaabe577b7e4b42ed0f1a7d1
hvmloader: flip "ACPI data" to "ACPI NVS" type for ACPI table region

ACPI specification contains statements describing memory marked with regular
"ACPI data" type as reclaimable by the guest. Although the guest shouldn't
really do it if it wants kexec or similar functionality to work, there
could still be ambiguities in treating these regions as potentially regular
RAM.

One such example is SeaBIOS which currently reports "ACPI data" regions as
RAM to the guest in its e801 call. Which it might have the right to do as any
user of this is expected to be ACPI unaware. But a QEMU bootloader later seems
to ignore that fact and is instead using e801 to find a place for initrd which
causes the tables to be erased. While arguably QEMU bootloader or SeaBIOS need
to be fixed / improved here, that is just one example of the potential problems
from using a reclaimable memory type.

Flip the type to "ACPI NVS" which doesn't have this ambiguity in it and is
described by the spec as non-reclaimable (so cannot ever be treated like RAM).

Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
tools/firmware/hvmloader/e820.c