ia64/xen-unstable

changeset 19722:691087b8d4ac

xend: pass-through: Use AUTO_PHP_SLOT as unknown vslot

This fixes a few cases where 0 is still used for an known vslot.

Signed-off-by: Simon Horman <horms@verge.net.au>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jun 04 10:43:20 2009 +0100 (2009-06-04)
parents 2c172f9db417
children 6c24ffb01d6b
files tools/python/xen/xend/XendConfig.py tools/python/xen/xend/server/pciif.py
line diff
     1.1 --- a/tools/python/xen/xend/XendConfig.py	Thu Jun 04 10:41:50 2009 +0100
     1.2 +++ b/tools/python/xen/xend/XendConfig.py	Thu Jun 04 10:43:20 2009 +0100
     1.3 @@ -31,7 +31,7 @@ from xen.xend.XendDSCSI import XendDSCSI
     1.4  from xen.xend.XendError import VmError
     1.5  from xen.xend.XendDevices import XendDevices
     1.6  from xen.xend.PrettyPrint import prettyprintstring
     1.7 -from xen.xend.XendConstants import DOM_STATE_HALTED
     1.8 +from xen.xend.XendConstants import DOM_STATE_HALTED, AUTO_PHP_SLOT_STR
     1.9  from xen.xend.xenstore.xstransact import xstransact
    1.10  from xen.xend.server.BlktapController import blktap_disk_types
    1.11  from xen.xend.server.netif import randomMAC
    1.12 @@ -1235,7 +1235,8 @@ class XendConfig(dict):
    1.13              dpci_record = {
    1.14                  'VM': self['uuid'],
    1.15                  'PPCI': ppci_uuid,
    1.16 -                'hotplug_slot': pci_dev.get('vslot', 0)
    1.17 +                'hotplug_slot': pci_dev.get('vslot',
    1.18 +                                            '0x' + AUTO_PHP_SLOT_STR)
    1.19              }
    1.20  
    1.21              dpci_opts = pci_dev.get('opts')
     2.1 --- a/tools/python/xen/xend/server/pciif.py	Thu Jun 04 10:41:50 2009 +0100
     2.2 +++ b/tools/python/xen/xend/server/pciif.py	Thu Jun 04 10:43:20 2009 +0100
     2.3 @@ -74,7 +74,8 @@ class PciController(DevController):
     2.4              bus = parse_hex(pci_config.get('bus', 0))
     2.5              slot = parse_hex(pci_config.get('slot', 0))
     2.6              func = parse_hex(pci_config.get('func', 0))            
     2.7 -            vslot = parse_hex(pci_config.get('vslot', 0))
     2.8 +            vslot = parse_hex(pci_config.get('vslot',
     2.9 +                                             '0x' + AUTO_PHP_SLOT_STR))
    2.10  
    2.11              if pci_config.has_key('opts'):
    2.12                  opts = serialise_pci_opts(pci_config['opts'])