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] xend, vt-d: do not reserve vtd_mem if iom

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend, vt-d: do not reserve vtd_mem if iommu is not enabled
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 02 Dec 2009 05:50:14 -0800
Delivery-date: Wed, 02 Dec 2009 05:50: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.fraser@xxxxxxxxxx>
# Date 1259761417 0
# Node ID a5501e2a80aadb3801669b8abc29286656062915
# Parent  28d967d08cd9398b924932b1c603537ab7f94c6f
xend, vt-d: do not reserve vtd_mem if iommu is not enabled

Signed-off-by: Dexuan Cui <dexuan.cui@xxxxxxxxx>
---
 tools/python/xen/xend/XendDomainInfo.py |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff -r 28d967d08cd9 -r a5501e2a80aa tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Wed Dec 02 13:39:07 2009 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py   Wed Dec 02 13:43:37 2009 +0000
@@ -2758,10 +2758,13 @@ class XendDomainInfo:
             # set memory limit
             xc.domain_setmaxmem(self.domid, maxmem)
 
-            # Reserve 1 page per MiB of RAM for separate VT-d page table.
-            vtd_mem = 4 * (self.info['memory_static_max'] / 1024 / 1024)
-            # Round vtd_mem up to a multiple of a MiB.
-            vtd_mem = ((vtd_mem + 1023) / 1024) * 1024
+            vtd_mem = 0
+            info = xc.physinfo()
+            if 'hvm_directio' in info['virt_caps']:
+                # Reserve 1 page per MiB of RAM for separate VT-d page table.
+                vtd_mem = 4 * (self.info['memory_static_max'] / 1024 / 1024)
+                # Round vtd_mem up to a multiple of a MiB.
+                vtd_mem = ((vtd_mem + 1023) / 1024) * 1024
 
             self.guest_bitsize = self.image.getBitSize()
             # Make sure there's enough RAM available for the domain

_______________________________________________
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] xend, vt-d: do not reserve vtd_mem if iommu is not enabled, Xen patchbot-unstable <=