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-users

Re: [Xen-users] BUG? domU reboot fails when using "pci =" option : FIXED

Ryan wrote:
On Tue, 2006-05-09 at 09:49 -0700, list user wrote:

Thanks Ryan,

I applied the patch and restarted xend.

We're definitely much closer. The domain creation still bombed but for other reasons. The value of ['func','0x1'] is being erroneously reported as ['func','0x0'], which explains the following error:

"Failed to open & read /sys/bus/pci/devices/0000:00:0f.0/resource: No such file or directory".


I'm glad that you caught that problem. I made a mistake in my regular
expression. Try the attached patch instead and let me know how it works.


Congratulations Ryan!  Great job.

Good news is I've successfully rebooted two different domains, each with
an exported pci device.

Bad news is xendomains fails to autostart the domains.

Good news is the same regular expression error exists in
python/xen/xm/create.py in preprocess_pci on line #657.

Bad news is xendomains still fails.

I'll post what I find under a new thread.

Thanks again,

:m)


Ryan


------------------------------------------------------------------------

diff -r 63a86863aa3f tools/python/xen/xend/server/pciif.py
--- a/tools/python/xen/xend/server/pciif.py     Tue May  9 12:39:16 2006
+++ b/tools/python/xen/xend/server/pciif.py     Tue May  9 13:58:01 2006
@@ -31,6 +31,7 @@
from xen.util.pci import PciDevice
 import resource
+import re
xc = xen.lowlevel.xc.xc() @@ -106,6 +107,30 @@ 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-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


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