linux/arch/x86/xen
Juergen Gross be35d91c88 xen: tolerate ACPI NVS memory overlapping with Xen allocated memory
In order to minimize required special handling for running as Xen PV
dom0, the memory layout is modified to match that of the host. This
requires to have only RAM at the locations where Xen allocated memory
is living. Unfortunately there seem to be some machines, where ACPI
NVS is located at 64 MB, resulting in a conflict with the loaded
kernel or the initial page tables built by Xen.

Avoid this conflict by swapping the ACPI NVS area in the memory map
with unused RAM. This is possible via modification of the dom0 P2M map.
Accesses to the ACPI NVS area are done either for saving and restoring
it across suspend operations (this will work the same way as before),
or by ACPI code when NVS memory is referenced from other ACPI tables.
The latter case is handled by a Xen specific indirection of
acpi_os_ioremap().

While the E820 map can (and should) be modified right away, the P2M
map can be updated only after memory allocation is working, as the P2M
map might need to be extended.

Fixes: 808fdb7193 ("xen: check for kernel memory conflicting with memory layout")
Signed-off-by: Juergen Gross <jgross@suse.com>
Tested-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
2024-09-12 08:25:12 +02:00
..
apic.c x86/xen: eliminate some private header files 2024-07-11 16:33:48 +02:00
debugfs.c x86/xen: eliminate some private header files 2024-07-11 16:33:48 +02:00
efi.c xen/efi: refactor deprecated strncpy 2023-09-19 07:04:49 +02:00
enlighten_hvm.c x86/xen: eliminate some private header files 2024-07-11 16:33:48 +02:00
enlighten_pv.c x86/xen: eliminate some private header files 2024-07-11 16:33:48 +02:00
enlighten_pvh.c x86/xen: fix memblock_reserve() usage on PVH 2024-07-25 13:11:08 +02:00
enlighten.c x86/xen: eliminate some private header files 2024-07-11 16:33:48 +02:00
grant-table.c x86/xen: open code alloc_vm_area in arch_gnttab_valloc 2020-10-18 09:27:10 -07:00
irq.c x86/paravirt: Move some functions and defines to alternative.c 2023-12-10 20:30:31 +01:00
Kconfig treewide: replace or remove redundant def_bool in Kconfig files 2024-02-20 20:47:45 +09:00
Makefile x86/PVH: obtain VGA console info in Dom0 2023-03-14 15:20:51 +01:00
mmu_hvm.c x86/xen: eliminate some private header files 2024-07-11 16:33:48 +02:00
mmu_pv.c xen: introduce generic helper checking for memory map conflicts 2024-09-10 10:07:07 +02:00
mmu.c x86/xen: eliminate some private header files 2024-07-11 16:33:48 +02:00
multicalls.c xen: fix multicall debug data referencing 2024-07-23 12:23:20 +02:00
p2m.c xen: allow mapping ACPI data using a different physical address 2024-09-12 08:25:07 +02:00
platform-pci-unplug.c x86: xen: platform-pci-unplug: use pr_err() and pr_warn() instead of raw printk() 2021-08-30 12:09:54 +02:00
pmu.c x86/xen: eliminate some private header files 2024-07-11 16:33:48 +02:00
setup.c xen: tolerate ACPI NVS memory overlapping with Xen allocated memory 2024-09-12 08:25:12 +02:00
smp_hvm.c x86/xen: eliminate some private header files 2024-07-11 16:33:48 +02:00
smp_pv.c xen: fix multicall debug data referencing 2024-07-23 12:23:20 +02:00
smp.c x86/xen: eliminate some private header files 2024-07-11 16:33:48 +02:00
spinlock.c x86/xen: remove deprecated xen_nopvspin boot parameter 2024-07-11 16:33:51 +02:00
suspend_hvm.c x86/xen: Add support for HVMOP_set_evtchn_upcall_vector 2022-08-12 11:28:21 +02:00
suspend_pv.c locking/seqlock, headers: Untangle the spaghetti monster 2020-08-06 16:13:13 +02:00
suspend.c x86/xen: eliminate some private header files 2024-07-11 16:33:48 +02:00
time.c x86/xen/time: Reduce Xen timer tick 2024-07-02 09:35:52 +02:00
trace.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vga.c x86: Do not include <asm/bootparam.h> in several files 2024-01-30 15:17:24 +01:00
xen-asm.S Linux 6.8-rc4 2024-02-14 10:45:07 +01:00
xen-head.S x86/boot: Simplify boot stack setup 2024-03-21 20:17:54 +01:00
xen-ops.h xen: add capability to remap non-RAM pages to different PFNs 2024-09-10 15:26:34 +02:00