From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hollis Blanchard Subject: [PATCH][XEN][POWERPC] allocate shadow memory for PPC Linux domains Date: Fri, 08 Dec 2006 14:25:15 -0600 Message-ID: <1165609515.23364.16.camel@basalt> References: <1165344436.11779.27.camel@basalt> Reply-To: Hollis Blanchard Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1100149596==" Return-path: In-Reply-To: <1165344436.11779.27.camel@basalt> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel , xen-ppc-devel List-Id: xen-devel@lists.xenproject.org --===============1100149596== Content-Type: multipart/alternative; boundary="=-rla1TyYw4PjlfyEEYAyN" --=-rla1TyYw4PjlfyEEYAyN Content-Type: text/plain Content-Transfer-Encoding: 7bit Allocate shadow memory for PPC Linux domains. Signed-off-by: Hollis Blanchard diff -r 9d83185b4c37 tools/python/xen/xend/image.py --- a/tools/python/xen/xend/image.py Fri Dec 01 19:11:02 2006 -0500 +++ b/tools/python/xen/xend/image.py Tue Dec 05 10:44:22 2006 -0600 @@ -246,6 +246,15 @@ class PPC_LinuxImageHandler(LinuxImageHa features = self.vm.getFeatures(), arch_args = devtree.to_bin()) + def getRequiredShadowMemory(self, shadow_mem_kb, maxmem_kb): + """@param shadow_mem_kb The configured shadow memory, in KiB. + @param maxmem_kb The configured maxmem, in KiB. + @return The corresponding required amount of shadow memory, also in + KiB. + PowerPC currently uses "shadow memory" to refer to the hash table.""" + return max(maxmem_kb / 64, shadow_mem_kb) + + class PPC_ProseImageHandler(LinuxImageHandler): ostype = "prose" -- Hollis Blanchard IBM Linux Technology Center --=-rla1TyYw4PjlfyEEYAyN Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit Allocate shadow memory for PPC Linux domains.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>

diff -r 9d83185b4c37 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py	Fri Dec 01 19:11:02 2006 -0500
+++ b/tools/python/xen/xend/image.py	Tue Dec 05 10:44:22 2006 -0600
@@ -246,6 +246,15 @@ class PPC_LinuxImageHandler(LinuxImageHa
                               features       = self.vm.getFeatures(),
                               arch_args      = devtree.to_bin())
 
+    def getRequiredShadowMemory(self, shadow_mem_kb, maxmem_kb):
+        """@param shadow_mem_kb The configured shadow memory, in KiB.
+        @param maxmem_kb The configured maxmem, in KiB.
+        @return The corresponding required amount of shadow memory, also in
+        KiB.
+        PowerPC currently uses "shadow memory" to refer to the hash table."""
+        return max(maxmem_kb / 64, shadow_mem_kb)
+
+
 class PPC_ProseImageHandler(LinuxImageHandler):
 
     ostype = "prose"

-- 
Hollis Blanchard
IBM Linux Technology Center

--=-rla1TyYw4PjlfyEEYAyN-- --===============1100149596== 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 --===============1100149596==--