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] [XEN][XEND][POWERPC] Don't ignore shadow

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEN][XEND][POWERPC] Don't ignore shadow memory requirement
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 14 Feb 2007 15:00:47 -0800
Delivery-date: Wed, 14 Feb 2007 15:21:02 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
# Date 1169758525 18000
# Node ID 54530b945067cb9d12be4bead54a387ab7622d98
# Parent  b071a2610abc5b145ba275c6ba0e7ad164c676fb
[XEN][XEND][POWERPC] Don't ignore shadow memory requirement
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>
Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
---
 tools/python/xen/xend/image.py |   33 ++++++++++++++++-----------------
 1 files changed, 16 insertions(+), 17 deletions(-)

diff -r b071a2610abc -r 54530b945067 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Tue Jan 23 08:54:41 2007 -0600
+++ b/tools/python/xen/xend/image.py    Thu Jan 25 15:55:25 2007 -0500
@@ -214,15 +214,23 @@ 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 +256,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 +587,7 @@ class X86_Linux_ImageHandler(LinuxImageH
 
 _handlers = {
     "powerpc": {
-        "linux": LinuxImageHandler,
+        "linux": PPC_LinuxImageHandler,
         "prose": PPC_ProseImageHandler,
     },
     "ia64": {

_______________________________________________
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] [XEN][XEND][POWERPC] Don't ignore shadow memory requirement, Xen patchbot-unstable <=