WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] x86/iommu: account for necessary allocati

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86/iommu: account for necessary allocations when calculating Dom0's initial allocation size
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 23 Dec 2010 05:34:04 -0800
Delivery-date: Thu, 23 Dec 2010 05:39:20 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1292320450 0
# Node ID 618ba64260faf45e6ec391582099d7388f013e81
# Parent  72326371ae8106b91da0ca6b0436dd2b6478b7a7
x86/iommu: account for necessary allocations when calculating Dom0's initial 
allocation size

As of c/s 21812:e382656e4dcc, IOMMU related allocations for Dom0
happen only after it got all of its memory allocated, and hence the
reserve (mainly for setting up its swiotlb) may get exhausted without
accounting for the necessary allocations up front.

While not precise, the estimate has been found to be within a couple
of pages for the systems it got tested on.

For the calculation to be reasonably correct, this depends on the
patch titled "x86/iommu: don't map RAM holes above 4G" sent out
yesterday.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 xen/arch/x86/domain_build.c |    9 +++++++++
 1 files changed, 9 insertions(+)

diff -r 72326371ae81 -r 618ba64260fa xen/arch/x86/domain_build.c
--- a/xen/arch/x86/domain_build.c       Tue Dec 14 09:53:41 2010 +0000
+++ b/xen/arch/x86/domain_build.c       Tue Dec 14 09:54:10 2010 +0000
@@ -190,6 +190,15 @@ static unsigned long __init compute_dom0
     /* ...and compat_l4's, if needed. */
     if ( is_pv_32on64_domain(d) )
         avail -= opt_dom0_max_vcpus - 1;
+
+    /* Reserve memory for iommu_dom0_init() (rough estimate). */
+    if ( iommu_enabled )
+    {
+        unsigned int s;
+
+        for ( s = 9; s < BITS_PER_LONG; s += 9 )
+            avail -= max_pdx >> s;
+    }
 
     /*
      * If domain 0 allocation isn't specified, reserve 1/16th of available

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86/iommu: account for necessary allocations when calculating Dom0's initial allocation size, Xen patchbot-unstable <=