linux-stable/arch/arm/xen
Oleksandr Tyshchenko b2371587fe 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>
2022-01-06 09:53:41 +01:00
..
Makefile xen/efi: have a common runtime setup function 2019-10-02 10:31:07 -04:00
enlighten.c arm/xen: Read extended regions from DT and init Xen resource 2022-01-06 09:53:41 +01:00
grant-table.c xen: re-introduce support for grant v2 interface 2017-11-06 15:50:17 -05:00
hypercall.S xen: allow pv-only hypercalls only with CONFIG_XEN_PV 2021-11-02 08:11:01 -05:00
mm.c xen/swiotlb: check if the swiotlb has already been initialized 2021-05-14 15:52:11 +02:00
p2m.c Xen/gnttab: introduce common INVALID_GRANT_{HANDLE,REF} 2021-03-10 16:39:29 -06:00