]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xen: add capability to remap non-RAM pages to different PFNs
authorJuergen Gross <jgross@suse.com>
Wed, 14 Aug 2024 14:47:25 +0000 (16:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:29:13 +0000 (16:29 +0200)
commit149fbd6aecdb550880498f093972eb0f777d3b86
tree90d073078577fcc4c849aad4240155da9e989600
parentf12153eece97e158cc75c4b44a66828352c4f7fd
xen: add capability to remap non-RAM pages to different PFNs

[ Upstream commit d05208cf7f05420ad10cc7f9550f91d485523659 ]

When running as a Xen PV dom0 it can happen that the kernel is being
loaded to a guest physical address conflicting with the host memory
map.

In order to be able to resolve this conflict, add the capability to
remap non-RAM areas to different guest PFNs. A function to use this
remapping information for other purposes than doing the remap will be
added when needed.

As the number of conflicts should be rather low (currently only
machines with max. 1 conflict are known), save the remap data in a
small statically allocated array.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Stable-dep-of: be35d91c8880 ("xen: tolerate ACPI NVS memory overlapping with Xen allocated memory")
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/xen/p2m.c
arch/x86/xen/xen-ops.h