xen: add helpers to allocate unpopulated memory
To be used in order to create foreign mappings. This is based on the ZONE_DEVICE facility which is used by persistent memory devices in order to create struct pages and kernel virtual mappings for the IOMEM areas of such devices. Note that on kernels without support for ZONE_DEVICE Xen will fallback to use ballooned pages in order to create foreign mappings. The newly added helpers use the same parameters as the existing {alloc/free}_xenballooned_pages functions, which allows for in-place replacement of the callers. Once a memory region has been added to be used as scratch mapping space it will no longer be released, and pages returned are kept in a linked list. This allows to have a buffer of pages and prevents resorting to frequent additions and removals of regions. If enabled (because ZONE_DEVICE is supported) the usage of the new functionality untangles Xen balloon and RAM hotplug from the usage of unpopulated physical memory ranges to map foreign page...
Showing
- drivers/gpu/drm/xen/xen_drm_front_gem.c 5 additions, 4 deletionsdrivers/gpu/drm/xen/xen_drm_front_gem.c
- drivers/xen/Kconfig 10 additions, 0 deletionsdrivers/xen/Kconfig
- drivers/xen/Makefile 1 addition, 0 deletionsdrivers/xen/Makefile
- drivers/xen/balloon.c 2 additions, 2 deletionsdrivers/xen/balloon.c
- drivers/xen/grant-table.c 2 additions, 2 deletionsdrivers/xen/grant-table.c
- drivers/xen/privcmd.c 2 additions, 2 deletionsdrivers/xen/privcmd.c
- drivers/xen/unpopulated-alloc.c 183 additions, 0 deletionsdrivers/xen/unpopulated-alloc.c
- drivers/xen/xenbus/xenbus_client.c 3 additions, 3 deletionsdrivers/xen/xenbus/xenbus_client.c
- drivers/xen/xlate_mmu.c 2 additions, 2 deletionsdrivers/xen/xlate_mmu.c
- include/xen/xen.h 9 additions, 0 deletionsinclude/xen/xen.h
Please register or sign in to comment