[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen staging] xen/arm: domain_build: Don't continue if unable to allocate all dom0 banks



commit 6341a674573f1834f083f0ab0f5b36b075f9e02e
Author:     Julien Grall <julien.grall@xxxxxxx>
AuthorDate: Wed Aug 21 22:42:31 2019 +0100
Commit:     Julien Grall <julien.grall@xxxxxxx>
CommitDate: Wed Oct 2 09:51:17 2019 +0100

    xen/arm: domain_build: Don't continue if unable to allocate all dom0 banks
    
    Xen will only print a warning if there are memory unallocated when using
    1:1 mapping (only used by dom0). This also includes the case where no
    memory has been allocated.
    
    It will bring to all sort of issues that can be hard to diagnostic for
    users (the warning can be difficult to spot or disregard).
    
    If the users request 1GB of memory, then most likely they want the exact
    amount and not 512MB. So panic if all the memory has not been allocated.
    
    After this change, the behavior is the same as for non-1:1 memory
    allocation (used by domU).
    
    At the same time, reflow the message to have the format on a single
    line.
    
    Signed-off-by: Julien Grall <julien.grall@xxxxxxx>
    Acked-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
 xen/arch/arm/domain_build.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index ec4f9912ef..cb5ba21f27 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -358,10 +358,9 @@ static void __init allocate_memory_11(struct domain *d,
     }
 
     if ( kinfo->unassigned_mem )
-        printk("WARNING: Failed to allocate requested dom0 memory."
-               /* Don't want format this as PRIpaddr (16 digit hex) */
-               " %ldMB unallocated\n",
-               (unsigned long)kinfo->unassigned_mem >> 20);
+        /* Don't want format this as PRIpaddr (16 digit hex) */
+        panic("Failed to allocate requested dom0 memory. %ldMB unallocated\n",
+              (unsigned long)kinfo->unassigned_mem >> 20);
 
     for( i = 0; i < kinfo->mem.nr_banks; i++ )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.