VT-d: prevent watchdog timer from kicking in when
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 11 May 2010 07:35:45 +0000 (08:35 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 11 May 2010 07:35:45 +0000 (08:35 +0100)
initializing on systems with huge amounts of memory

Process pending soft-IRQs every 4G worth of pages initialized for Dom0
to keep timekeeping happy and prevent the NMI watchdog (when enabled)
from kicking in.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen/drivers/passthrough/vtd/ia64/vtd.c
xen/drivers/passthrough/vtd/x86/vtd.c

index 7b740d2d84f2a99ddd6540e899863ba186209648..660bcd35128bb63a50ef4dd1486cc4abc5637c44 100644 (file)
@@ -19,6 +19,7 @@
  */
 
 #include <xen/sched.h>
+#include <xen/softirq.h>
 #include <xen/domain_page.h>
 #include <xen/iommu.h>
 #include <xen/numa.h>
@@ -110,6 +111,9 @@ static int do_dom0_iommu_mapping(unsigned long start, unsigned long end,
             iommu_map_page(d, (pfn*tmp+j), (pfn*tmp+j));
 
        page_addr += PAGE_SIZE;
+
+        if (!(pfn & (0xfffff >> (PAGE_SHIFT - PAGE_SHIFT_4K))))
+            process_pending_softirqs();
     }
     return 0;
 }
index 74e31ccb72458570ac57a3577cc4bdf39218ce9c..580fc03eda14ae5758ff69e91a8fd3d63593eb64 100644 (file)
@@ -19,6 +19,7 @@
  */
 
 #include <xen/sched.h>
+#include <xen/softirq.h>
 #include <xen/domain_page.h>
 #include <asm/paging.h>
 #include <xen/iommu.h>
@@ -153,6 +154,9 @@ void iommu_set_dom0_mapping(struct domain *d)
         tmp = 1 << (PAGE_SHIFT - PAGE_SHIFT_4K);
         for ( j = 0; j < tmp; j++ )
             iommu_map_page(d, (i*tmp+j), (i*tmp+j));
+
+        if (!(i & (0xfffff >> (PAGE_SHIFT - PAGE_SHIFT_4K))))
+            process_pending_softirqs();
     }
 }