debuggers.hg

changeset 19974:4afd6669a351

pass-through: use vdevn in xm_pci_attach()

Use vdevfn in xm_pci_attach() for non-zero functions,
the vslot element of dev dictionaries no longer exists.

Signed-off-by: Simon Horman <horms@verge.net.au>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Jul 14 14:38:56 2009 +0100 (2009-07-14)
parents 42795382cb93
children e845326ae203
files tools/python/xen/xm/main.py
line diff
     1.1 --- a/tools/python/xen/xm/main.py	Tue Jul 14 14:37:53 2009 +0100
     1.2 +++ b/tools/python/xen/xm/main.py	Tue Jul 14 14:38:56 2009 +0100
     1.3 @@ -2555,13 +2555,13 @@ def xm_pci_attach(args):
     1.4  
     1.5      # If the slot wasn't spefified in the args then use the slot
     1.6      # assigned to the head by qemu-xen for the rest of the functions
     1.7 -    if int(head_dev['vslot'], 16) & AUTO_PHP_SLOT:
     1.8 +    if int(head_dev['vdevfn'], 16) & AUTO_PHP_SLOT:
     1.9          vdevfn = int(find_attached_devfn(attached_pci_dict(dom), head_dev), 16)
    1.10          if not vdevfn & AUTO_PHP_SLOT:
    1.11              vslot = PCI_SLOT(vdevfn)
    1.12              for i in dev:
    1.13 -                i['vslot'] = '0x%02x' % \
    1.14 -		             PCI_DEVFN(vslot, PCI_FUNC(int(i['vslot'], 16)))
    1.15 +                i['vdevfn'] = '0x%02x' % \
    1.16 +		             PCI_DEVFN(vslot, PCI_FUNC(int(i['vdevfn'], 16)))
    1.17  
    1.18      for i in dev:
    1.19          xm_pci_attach_one(dom, i)