xen: allow balloon driver to use more than one memory region
Allow the xen balloon driver to populate its list of extra pages from more than one region of memory. This will allow platforms to provide (for example) a region of low memory and a region of high memory. The maximum possible number of extra regions is 128 (== E820MAX) which is quite large so xen_extra_mem is placed in __initdata. This is safe as both xen_memory_setup() and balloon_init() are in __init. The balloon regions themselves are not altered (i.e., there is still only the one region). Signed-off-by: David Vrabel <david.vrabel@citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
This commit is contained in:
parent
b1cbf9b1d6
commit
8b5d44a5ac
3 changed files with 46 additions and 28 deletions
|
@ -3,7 +3,15 @@
|
|||
|
||||
#include <asm/xen/page.h>
|
||||
|
||||
extern phys_addr_t xen_extra_mem_start, xen_extra_mem_size;
|
||||
struct xen_memory_region {
|
||||
phys_addr_t start;
|
||||
phys_addr_t size;
|
||||
};
|
||||
|
||||
#define XEN_EXTRA_MEM_MAX_REGIONS 128 /* == E820MAX */
|
||||
|
||||
extern __initdata
|
||||
struct xen_memory_region xen_extra_mem[XEN_EXTRA_MEM_MAX_REGIONS];
|
||||
|
||||
extern unsigned long xen_released_pages;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue