From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: [PATCH] VT-d: prevent watchdog timer from kicking in when initializing on systems with huge amounts of memory Date: Mon, 10 May 2010 09:46:21 +0100 Message-ID: <4BE7E3FD0200007800002043@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__PartCEE46FCD.0__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__PartCEE46FCD.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 --- 2010-05-04.orig/xen/drivers/passthrough/vtd/ia64/vtd.c 2010-02-12 = 08:48:15.000000000 +0100 +++ 2010-05-04/xen/drivers/passthrough/vtd/ia64/vtd.c 2010-05-10 = 10:35:54.000000000 +0200 @@ -19,6 +19,7 @@ */ =20 #include +#include #include #include #include @@ -110,6 +111,9 @@ static int do_dom0_iommu_mapping(unsigne iommu_map_page(d, (pfn*tmp+j), (pfn*tmp+j)); =20 page_addr +=3D PAGE_SIZE; + + if (!(pfn & (0xfffff >> (PAGE_SHIFT - PAGE_SHIFT_4K)))) + process_pending_softirqs(); } return 0; } --- 2010-05-04.orig/xen/drivers/passthrough/vtd/x86/vtd.c 2010-02-12 = 08:48:15.000000000 +0100 +++ 2010-05-04/xen/drivers/passthrough/vtd/x86/vtd.c 2010-05-10 = 10:35:06.000000000 +0200 @@ -19,6 +19,7 @@ */ =20 #include +#include #include #include #include @@ -153,6 +154,9 @@ void iommu_set_dom0_mapping(struct domai tmp =3D 1 << (PAGE_SHIFT - PAGE_SHIFT_4K); for ( j =3D 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(); } } =20 --=__PartCEE46FCD.0__= Content-Type: text/plain; name="vtd-dom0-mapping-latency.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="vtd-dom0-mapping-latency.patch" Process pending soft-IRQs every 4G worth of pages initialized for = Dom0=0Ato keep timekeeping happy and prevent the NMI watchdog (when = enabled)=0Afrom kicking in.=0A=0ASigned-off-by: Jan Beulich =0A=0A--- 2010-05-04.orig/xen/drivers/passthrough/vtd/ia64/vtd.c = 2010-02-12 08:48:15.000000000 +0100=0A+++ 2010-05-04/xen/drivers/passthroug= h/vtd/ia64/vtd.c 2010-05-10 10:35:54.000000000 +0200=0A@@ -19,6 = +19,7 @@=0A */=0A =0A #include =0A+#include = =0A #include =0A #include =0A #include = =0A@@ -110,6 +111,9 @@ static int do_dom0_iommu_mapping(unsigne= =0A iommu_map_page(d, (pfn*tmp+j), (pfn*tmp+j));=0A =0A = page_addr +=3D PAGE_SIZE;=0A+=0A+ if (!(pfn & (0xfffff >> (PAGE_SHIF= T - PAGE_SHIFT_4K))))=0A+ process_pending_softirqs();=0A = }=0A return 0;=0A }=0A--- 2010-05-04.orig/xen/drivers/passthrough/vtd/x= 86/vtd.c 2010-02-12 08:48:15.000000000 +0100=0A+++ 2010-05-04/xen/dr= ivers/passthrough/vtd/x86/vtd.c 2010-05-10 10:35:06.000000000 +0200=0A@@ = -19,6 +19,7 @@=0A */=0A =0A #include =0A+#include =0A #include =0A #include =0A = #include =0A@@ -153,6 +154,9 @@ void iommu_set_dom0_mapping(st= ruct domai=0A tmp =3D 1 << (PAGE_SHIFT - PAGE_SHIFT_4K);=0A = for ( j =3D 0; j < tmp; j++ )=0A iommu_map_page(d, (i*tmp+j), = (i*tmp+j));=0A+=0A+ if (!(i & (0xfffff >> (PAGE_SHIFT - PAGE_SHIFT_4= K))))=0A+ process_pending_softirqs();=0A }=0A }=0A =0A --=__PartCEE46FCD.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=__PartCEE46FCD.0__=--