ia64/xen-unstable

changeset 12738:2a6a793a2f68

[PVFB][TOOLS] Fix save/restore for domains with PV framebuffers.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
author Steven Smith <ssmith@xensource.com>
date Fri Dec 01 12:38:41 2006 +0000 (2006-12-01)
parents b22274d1311c
children d57b0e2834d7
files tools/python/xen/xend/server/vfbif.py
line diff
     1.1 --- a/tools/python/xen/xend/server/vfbif.py	Fri Dec 01 12:20:12 2006 +0000
     1.2 +++ b/tools/python/xen/xend/server/vfbif.py	Fri Dec 01 12:38:41 2006 +0000
     1.3 @@ -14,11 +14,13 @@ def spawn_detached(path, args, env):
     1.4          
     1.5  class VfbifController(DevController):
     1.6      """Virtual frame buffer controller. Handles all vfb devices for a domain.
     1.7 +    Note that we only support a single vfb per domain at the moment.
     1.8      """
     1.9  
    1.10      def __init__(self, vm):
    1.11          DevController.__init__(self, vm)
    1.12 -
    1.13 +        self.config = {}
    1.14 +        
    1.15      def getDeviceDetails(self, config):
    1.16          """@see DevController.getDeviceDetails"""
    1.17          devid = 0
    1.18 @@ -26,8 +28,15 @@ class VfbifController(DevController):
    1.19          front = {}
    1.20          return (devid, back, front)
    1.21  
    1.22 +    def getDeviceConfiguration(self, devid):
    1.23 +        r = DevController.getDeviceConfiguration(self, devid)
    1.24 +        for (k,v) in self.config.iteritems():
    1.25 +            r[k] = v
    1.26 +        return r
    1.27 +    
    1.28      def createDevice(self, config):
    1.29          DevController.createDevice(self, config)
    1.30 +        self.config = config
    1.31          std_args = [ "--domid", "%d" % self.vm.getDomid(),
    1.32                       "--title", self.vm.getName() ]
    1.33          t = config.get("type", None)