diff mbox series

[RFC,v2,11/14] Don't panic if no multiboot modules are provided on live update boot

Message ID 20200122085357.2092778-11-dwmw2@infradead.org (mailing list archive)
State New, archived
Headers show
Series Live update: boot memory management, data stream handling | expand

Commit Message

David Woodhouse Jan. 22, 2020, 8:53 a.m. UTC
From: David Woodhouse <dwmw@amazon.co.uk>

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
---
 xen/arch/x86/setup.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 521946dc27..bd65d6bf5d 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -883,9 +883,14 @@  void __init noreturn __start_xen(unsigned long mbi_p)
     printk(" Found %d EDD information structures\n",
            bootsym(boot_edd_info_nr));
 
-    /* Check that we have at least one Multiboot module. */
-    if ( !(mbi->flags & MBI_MODULES) || (mbi->mods_count == 0) )
-        panic("dom0 kernel not specified. Check bootloader configuration\n");
+    if ( lu_data ) {
+        if ( (mbi->flags & MBI_MODULES) && (mbi->mods_count > 0) )
+            panic("Multiboot modules provided with live update data\n");
+    } else {
+        /* Check that we have at least one Multiboot module. */
+        if ( !(mbi->flags & MBI_MODULES) || (mbi->mods_count == 0) )
+            panic("dom0 kernel not specified. Check bootloader configuration\n");
+    }
 
     /* Check that we don't have a silly number of modules. */
     if ( mbi->mods_count > sizeof(module_map) * 8 )