x86: avoid tripping watchdog when constructing dom0
authorRoss Lagerwall <ross.lagerwall@citrix.com>
Fri, 12 Jun 2015 10:07:05 +0000 (12:07 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 12 Jun 2015 10:07:05 +0000 (12:07 +0200)
Constructing dom0 may take a few seconds, particularly if the slow VESA
graphics terminal is used. Process pending softirqs a few times to avoid
tripping a watchdog with a short timeout.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Move inclusion of xen/softirq.h (and at once clean up other includes).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/domain_build.c
xen/common/libelf/libelf-dominfo.c
xen/common/libelf/libelf-private.h

index 03e4bfeb84f3b201b94eff4fba433309b3cc27fc..d76707fc539e3c91b1a0dc9646239d382154d00f 100644 (file)
@@ -930,6 +930,8 @@ int __init construct_dom0(
     BUG_ON(d->vcpu[0] == NULL);
     BUG_ON(v->is_initialised);
 
+    process_pending_softirqs();
+
     printk("*** LOADING DOMAIN 0 ***\n");
 
     d->max_pages = ~0U;
@@ -1167,6 +1169,8 @@ int __init construct_dom0(
            _p(v_start), _p(v_end));
     printk(" ENTRY ADDRESS: %p\n", _p(parms.virt_entry));
 
+    process_pending_softirqs();
+
     mpt_alloc = (vpt_start - v_start) + pfn_to_paddr(alloc_spfn);
     if ( vinitrd_start )
         mpt_alloc -= PAGE_ALIGN(initrd_len);
index 86403b9f8af3516090349c879947be30155cf7f1..0771323750cb7e5bdb0a445d4ff9ebdd6b1d879a 100644 (file)
@@ -235,6 +235,10 @@ static unsigned elf_xen_parse_notes(struct elf_binary *elf,
           ELF_HANDLE_PTRVAL(note) < parms->elf_note_end;
           note = elf_note_next(elf, note) )
     {
+#ifdef __XEN__
+        process_pending_softirqs();
+#endif
+
         if ( *total_note_count >= ELF_MAX_TOTAL_NOTE_COUNT )
         {
             elf_mark_broken(elf, "too many ELF notes");
index 854a0d7319718e4a16ac2da73986cb0b96bf7c8f..dd4675a460f01ef6b21249d48c9e727d6813f827 100644 (file)
 
 #ifdef __XEN__
 
-#include <xen/config.h>
-#include <xen/types.h>
-#include <xen/string.h>
 #include <xen/lib.h>
 #include <xen/libelf.h>
+#include <xen/softirq.h>
 #include <asm/byteorder.h>
 #include <public/elfnote.h>