Skip to contentSkip to conversation

Initialize Xen structures from initial()

PATCH New Petr Tesarik 1 participant 1 message Aug 21, 2012 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#1 lore raw

PATCH 1/1 Initialize Xen structures from initial()

In reply to a message not in the archive

Hi all,

one more Xen-related patch. This one is independent of the other patch set.

There are two functions to initialize the internal variables:
initial() and initial_xen(). Both must be called for Xen dumps, but only initial() is called when dumping dmesg.

With this patch applied, makedumpfile is capable of extracting dmesg from Xen dump files.

---
 makedumpfile.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
makedumpfile.c +5 -4
@@ -2514,6 +2514,8 @@ initialize_bitmap_memory(void)
 	return TRUE;
 }
 
+int initial_xen(void);
+
 int
 initial(void)
 {
@@ -2521,6 +2523,9 @@ initial(void)
 	unsigned long size;
 	int debug_info = FALSE;
 
+	if (is_xen_memory() && !initial_xen())
+		return FALSE;
+
 #ifdef USELZO
 	if (lzo_init() == LZO_E_OK)
 		info->flag_lzo_support = TRUE;
@@ -6215,10 +6220,6 @@ create_dumpfile(void)
 		if (!get_elf_info(info->fd_memory, info->name_memory))
 			return FALSE;
 	}
-	if (is_xen_memory()) {
-		if (!initial_xen())
-			return FALSE;
-	}
 	if (!initial())
 		return FALSE;
 

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec