mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen/arm: check max_init_domid validity
Before trying to create a dom0less guest, check that max_init_domid increment will generate a valid domain ID, lower than DOMID_FIRST_RESERVED. Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
1 parent
31270f11a9
commit
002641a8b7
1 file changed
+3
@@ -3879,6 +3879,9 @@ void __init create_domUs(void)
|
||||
if ( !dt_device_is_compatible(node, "xen,domain") )
|
||||
continue;
|
||||
|
||||
if ( (max_init_domid + 1) >= DOMID_FIRST_RESERVED )
|
||||
panic("No more domain IDs available\n");
|
||||
|
||||
if ( dt_find_property(node, "xen,static-mem", NULL) )
|
||||
flags |= CDF_staticmem;
|
||||
|
||||
|
||||