|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Re: Xen 3.4 multi-function pass-through tree, isn't working...
Hi Tom,
I'm still scratching my head over this one. Would it be possible for you
to apply the following patch and post the resulting xend.log?
It includes your work-around as well as some extra debugging messages. I'm
interested to try and see what kind of state your xenstore is getting into.
Thanks
Index:
xen-3.4-testing-pass-through-multi-function/tools/python/xen/xend/XendDomainInfo.py
===================================================================
---
xen-3.4-testing-pass-through-multi-function.orig/tools/python/xen/xend/XendDomainInfo.py
2009-07-24 19:01:00.000000000 +1000
+++
xen-3.4-testing-pass-through-multi-function/tools/python/xen/xend/XendDomainInfo.py
2009-07-24 19:02:35.000000000 +1000
@@ -2137,6 +2137,13 @@ class XendDomainInfo:
log.info("createDevice: %s : %s" % (devclass,
scrub_password(config)))
dev_uuid = config.get('uuid')
devid = self._createDevice(devclass, config)
+
+ num_devs =
self.getDeviceController(devclass).readBackend(devid, "num_devs")
+ if num_devs:
+ for i in range(int(num_devs)):
+ dev =
self.getDeviceController(devclass).readBackend(devid, "dev-%i" % i)
+ state =
self.getDeviceController(devclass).readBackend(devid, "state-%i" % i)
+ log.info("Created PCI device %s at index %i with state
%s" % (dev, i, state))
# store devid in XendConfig for caching reasons
if dev_uuid in self.info['devices']:
Index:
xen-3.4-testing-pass-through-multi-function/tools/python/xen/xend/server/pciif.py
===================================================================
---
xen-3.4-testing-pass-through-multi-function.orig/tools/python/xen/xend/server/pciif.py
2009-07-24 14:53:03.000000000 +1000
+++
xen-3.4-testing-pass-through-multi-function/tools/python/xen/xend/server/pciif.py
2009-07-24 19:02:55.000000000 +1000
@@ -110,6 +110,9 @@ class PciController(DevController):
states = config.get('states', [])
num_olddevs = int(self.readBackend(devid, 'num_devs'))
+ log.debug('reconfigureDevice: num_devs=%d num_olddevs=%d' %
+ (num_devs, num_olddevs))
+
for i in range(num_devs):
try:
dev = back['dev-%i' % i]
@@ -126,10 +129,13 @@ class PciController(DevController):
devno = self.reconfigureDevice_find(devid, num_olddevs, dev)
if devno == None:
devno = num_olddevs + i
- log.debug('Attaching PCI device %s.' % dev)
+ log.debug('Attaching PCI device %s at index %d.' %
+ (dev, devno))
attaching = True
else:
- log.debug('Reconfiguring PCI device %s.' % dev)
+ state = self.readBackend(devid, 'state-%i' % devno)
+ log.debug(('Reconfiguring PCI device %s at index %d ' +
+ 'with state %s.') % (dev, devno, state))
attaching = False
self.setupOneDevice(parse_pci_name(dev))
@@ -499,7 +505,14 @@ class PciController(DevController):
num_devs = int(self.readBackend(devid, 'num_devs'))
new_num_devs = 0
for i in range(num_devs):
- state = int(self.readBackend(devid, 'state-%i' % i))
+ dev = self.readBackend(devid, 'dev-%i' % i)
+ state_str = self.readBackend(devid, 'state-%i' % i)
+ log.debug('Cleanup PCI device %s at index %d with state %s' %
(dev, i, state_str))
+ try:
+ state = int(state_str)
+ except:
+ state = xenbusState['Unknown']
+
if state == xenbusState['Closing']:
# Detach I/O resources.
pci_dev = parse_pci_name(self.readBackend(devid, 'dev-%i' % i))
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |