]> git.baikalelectronics.ru Git - kernel.git/commit
arm/xen: Read extended regions from DT and init Xen resource
authorOleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Thu, 9 Dec 2021 20:05:35 +0000 (22:05 +0200)
committerJuergen Gross <jgross@suse.com>
Thu, 6 Jan 2022 08:53:41 +0000 (09:53 +0100)
commit3fe625b0b84d1cb3b2afcc0e7ec2833877ec7a17
treed2b161445de40654e776a5b1c412293690a139f2
parent7ecdfbcb93b950a6aa7e2cd0fde2bccf19de7857
arm/xen: Read extended regions from DT and init Xen resource

This patch implements arch_xen_unpopulated_init() on Arm where
the extended regions (if any) are gathered from DT and inserted
into specific Xen resource to be used as unused address space
for Xen scratch pages by unpopulated-alloc code.

The extended region (safe range) is a region of guest physical
address space which is unused and could be safely used to create
grant/foreign mappings instead of wasting real RAM pages from
the domain memory for establishing these mappings.

The extended regions are chosen by the hypervisor at the domain
creation time and advertised to it via "reg" property under
hypervisor node in the guest device-tree. As region 0 is reserved
for grant table space (always present), the indexes for extended
regions are 1...N.

If arch_xen_unpopulated_init() fails for some reason the default
behaviour will be restored (allocate xenballooned pages).

This patch also removes XEN_UNPOPULATED_ALLOC dependency on x86.

Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Link: https://lore.kernel.org/r/1639080336-26573-6-git-send-email-olekstysh@gmail.com
Signed-off-by: Juergen Gross <jgross@suse.com>
arch/arm/xen/enlighten.c
drivers/xen/Kconfig