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] This patch enhances the Summagraphics emulation by addin

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] This patch enhances the Summagraphics emulation by adding 2 features:
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 11 May 2006 09:38:13 +0000
Delivery-date: Thu, 11 May 2006 02:41:06 -0700
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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 4b4d16fe0b05317480a79ec33b696402d214c019
# Parent  50989084d4d0bd3ae8005469f129259aa4d74f5c
The PciController class lacks a configuration method to re-generate the
configuration of an existing domain. This is needed for a domain to be
able to reboot and retain its PCI device configuration. This patch adds
such support.

Thanks to Mike Wright for reporting this problem and working with me to
fix it.

Signed-off-by: Ryan Wilson <hap9@xxxxxxxxxxxxxx>
---
 tools/python/xen/xend/server/pciif.py |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+)

diff -r 50989084d4d0 -r 4b4d16fe0b05 tools/python/xen/xend/server/pciif.py
--- a/tools/python/xen/xend/server/pciif.py     Wed May 10 16:06:55 2006 +0100
+++ b/tools/python/xen/xend/server/pciif.py     Wed May 10 16:07:46 2006 +0100
@@ -31,6 +31,7 @@ import xen.lowlevel.xc
 
 from xen.util.pci import PciDevice
 import resource
+import re
 
 xc = xen.lowlevel.xc.xc()
 
@@ -106,6 +107,30 @@ class PciController(DevController):
 
         return (0, back, {})
 
+    def configuration(self, devid):
+        """@see DevController.configuration"""
+
+        result = DevController.configuration(self, devid)
+
+        (num_devs) = self.readBackend(devid, 'num_devs')
+
+        for i in range(int(num_devs)):
+            (dev_config) = self.readBackend(devid, 'dev-%d'%(i))
+
+            pci_match = re.match(r"((?P<domain>[0-9a-fA-F]{1,4})[:,])?" + \
+                    r"(?P<bus>[0-9a-fA-F]{1,2})[:,]" + \
+                    r"(?P<slot>[0-9a-fA-F]{1,2})[.,]" + \
+                    r"(?P<func>[0-9a-fA-F]{1,2})", dev_config)
+            if pci_match!=None:
+                pci_dev_info = pci_match.groupdict('0')
+                result.append( ['dev', \
+                        ['domain', '0x'+pci_dev_info['domain']], \
+                        ['bus', '0x'+pci_dev_info['bus']], \
+                        ['slot', '0x'+pci_dev_info['slot']], \
+                        ['func', '0x'+pci_dev_info['func']]])
+
+        return result
+
     def setupDevice(self, domain, bus, slot, func):
         """ Attach I/O resources for device to frontend domain
         """

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] This patch enhances the Summagraphics emulation by adding 2 features:, Xen patchbot-unstable <=