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-ppc-devel

[XenPPC] [PATCH] xend: Don't ignore shadow memory requirement

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [PATCH] xend: Don't ignore shadow memory requirement
From: Ryan Harper <ryanh@xxxxxxxxxx>
Date: Thu, 25 Jan 2007 13:32:57 -0600
Cc: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Delivery-date: Thu, 25 Jan 2007 11:32:22 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6+20040907i
In the process of syncing our python with xen-unstable I eliminated the
PPC_LinuxImageHandler class as we can now use the generic handler since
we create the devtree in libxc.  However, we still need to provide a
shadow memory calculation.  This patch restores the class and implements
the getRequiredShadowMemory() method.  This eliminates the following
message from xen:

(XEN) shadow_set_allocation: WARNING!!: Update your managment tools

The prose builder now derives itself from the restore class.  Jimi
mentioned that the configure() method in the prose class can be dropped.


-- 
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
(512) 838-9253   T/L: 678-9253
ryanh@xxxxxxxxxx


diffstat output:
 image.py |   32 +++++++++++++++-----------------
 1 files changed, 15 insertions(+), 17 deletions(-)

Signed-off-by: Ryan Harper <ryanh@xxxxxxxxxx>
---
We don't need a custom buildDomain() anymore but we do need to provide a
shadow memory calculation.  

 - Create PPC_LinuxImageHandler class to implement
   getRequiredShadowMemory().  
 - Derive prose builder from PPC_LinuxImageHandlerClass.
 - Drop configure() as it is not needed according to Jimi.

Signed-off-by: Ryan Harper <ryanh@xxxxxxxxxx>

diff -r b6751137c3c4 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Thu Jan 25 13:18:37 2007 -0600
+++ b/tools/python/xen/xend/image.py    Thu Jan 25 13:20:37 2007 -0600
@@ -214,15 +214,22 @@ class LinuxImageHandler(ImageHandler):
                               ramdisk        = self.ramdisk,
                               features       = self.vm.getFeatures())
 
-
-
-class PPC_ProseImageHandler(LinuxImageHandler):
+class PPC_LinuxImageHandler(LinuxImageHandler):
+
+    ostype = "linux"
+
+    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(PPC_LinuxImageHandler):
 
     ostype = "prose"
-
-    def configure(self, vmConfig, imageConfig, deviceConfig):
-        LinuxImageHandler.configure(self, vmConfig, imageConfig, deviceConfig)
-        self.imageConfig = imageConfig
 
     def buildDomain(self):
         store_evtchn = self.vm.getStorePort()
@@ -248,15 +255,6 @@ class PPC_ProseImageHandler(LinuxImageHa
                                    cmdline        = self.cmdline,
                                    ramdisk        = self.ramdisk,
                                    features       = self.vm.getFeatures())
-
-    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 HVMImageHandler(ImageHandler):
 
@@ -588,7 +586,7 @@ class X86_Linux_ImageHandler(LinuxImageH
 
 _handlers = {
     "powerpc": {
-        "linux": LinuxImageHandler,
+        "linux": PPC_LinuxImageHandler,
         "prose": PPC_ProseImageHandler,
     },
     "ia64": {

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

<Prev in Thread] Current Thread [Next in Thread>