[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH for-4.12 v2 2/2] xen/arm: Stop relocating Xen
On 17.12.18 19:02, Julien Grall wrote: I didn't get you wrong. We are saying the same things :). Great! Similarly, some version on Linux (i.e prior to 4.2) requires the DTB to within 512MB from the kernel. I've seen that restriction in the Linux for ARM64 documentation. in `allocate_memory_11()` prone to end up with a wrong RAM start alignment.Patches are welcomed. I see something like following as a quick WA (not even build tested): diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index d2c63a8..bf72ba9 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -223,8 +223,9 @@ fail: * meet these requirements directly. So instead of proceed as follows: * * We first allocate the largest allocation we can as low as we - * can. This then becomes the first bank. This bank must be at least - * 128MB (or dom0_mem if that is smaller). + * can. This then becomes the first bank. This bank is at least 128MB even if + * dom0 is configured for less. It is the way to get that bank 128MB aligned, + * what is required for 32-bit zImage. * * Then we start allocating more memory, trying to allocate the * largest possible size and trying smaller sizes until we @@ -253,7 +254,7 @@ static void __init allocate_memory_11(struct domain *d, struct kernel_info *kinfo) { const unsigned int min_low_order = - get_order_from_bytes(min_t(paddr_t, dom0_mem, MB(128))); + get_order_from_bytes(MB(128)); const unsigned int min_order = get_order_from_bytes(MB(4)); struct page_info *pg; unsigned int order = get_allocation_size(kinfo->unassigned_mem); @@ -268,6 +269,10 @@ static void __init allocate_memory_11(struct domain *d, */ BUG_ON(!is_domain_direct_mapped(d));+ if ( dom0_mem < MB(128)) + printk(XENLOG_WARNING "Allocating 128MB for Domain0 with %"PRIu64"MB\n", + dom0_mem/MB(1)); + printk("Allocating 1:1 mappings totalling %ldMB for dom0:\n", /* Don't want format this as PRIpaddr (16 digit hex) */ (unsigned long)(kinfo->unassigned_mem >> 20)); But I'm not sure if it worth to be sent, because I'm going to rewrite it soon. -- Sincerely, Andrii Anisov. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |