@@ -28,6 +28,8 @@
static unsigned int __initdata opt_dom0_max_vcpus;
integer_param("dom0_max_vcpus", opt_dom0_max_vcpus);
+static unsigned int __initdata opt_dom0_use_lowmem;
+integer_param("dom0_use_lowmem", opt_dom0_use_lowmem);
int dom0_11_mapping = 1;
@@ -244,7 +246,7 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo)
unsigned int order = get_11_allocation_size(kinfo->unassigned_mem);
int i;
- bool_t lowmem = is_32bit_domain(d);
+ bool_t lowmem = is_32bit_domain(d) || !!opt_dom0_use_lowmem;
unsigned int bits;
/*
In Patch 2, only alloacte lowmem in the first try and allocate memory
for bank0.
My test log:
(XEN) Allocated 0x000000a0000000-0x000000c0000000 (512MB/2048MB, order 17)
(XEN) Allocated 0x00000980000000-0x000009c0000000 (1024MB/1536MB, order 18)
(XEN) Allocated 0x000009c0000000-0x000009e0000000 (512MB/512MB, order 17)
(XEN) BANK[0] 0x000000a0000000-0x000000c0000000 (512MB)
(XEN) BANK[1] 0x00000980000000-0x000009e0000000 (1536MB)
512MB is allocated in lowmem.
patch 2:
@@ -28,6 +28,8 @@
static unsigned int __initdata opt_dom0_max_vcpus;
integer_param("dom0_max_vcpus", opt_dom0_max_vcpus);
+static unsigned int __initdata opt_dom0_use_lowmem;
+integer_param("dom0_use_lowmem", opt_dom0_use_lowmem);
int dom0_11_mapping = 1;
@@ -265,7 +267,9 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo)
*/
while ( order >= min_low_order )
{
- for ( bits = order ; bits <= (lowmem ? 32 : PADDR_BITS); bits++ )
+ for ( bits = order ;
+ bits <= ((lowmem || !!opt_dom0_use_lowmem) ? 32 : PADDR_BITS);
+ bits++ )
{
pg = alloc_domheap_pages(d, order, MEMF_bits(bits));
if ( pg != NULL )