debuggers.hg
changeset 19607:4eef30c14a14
xm: Fix hot-unplug of statically-assigned devices
Prior to changset 19510:5c69f98c348e - 'xm, xend: Replace "vslt" with
"vslot"', both vslt and vslot were used in the xm code, often fairly
arbitrarily.
However, in the dictionary that describes a pci function both vslt and
vslot were present. vslt stored the slot assigned to the function. And
vslot stored the slot the user requested for the function, or
AUTO_PHP_SLOT if no slot was requested.
With the renaming these two values got merged into a single entry.
This patch un-merges them by renaming the what was vslot to
requested_vslot.
So an out of chronological order list of name changes is:
'vslot' -> 'requested_vslot'
'vslt' -> 'vslot'
Signed-off-by: Simon Horman <horms@verge.net.au>
Prior to changset 19510:5c69f98c348e - 'xm, xend: Replace "vslt" with
"vslot"', both vslt and vslot were used in the xm code, often fairly
arbitrarily.
However, in the dictionary that describes a pci function both vslt and
vslot were present. vslt stored the slot assigned to the function. And
vslot stored the slot the user requested for the function, or
AUTO_PHP_SLOT if no slot was requested.
With the renaming these two values got merged into a single entry.
This patch un-merges them by renaming the what was vslot to
requested_vslot.
So an out of chronological order list of name changes is:
'vslot' -> 'requested_vslot'
'vslt' -> 'vslot'
Signed-off-by: Simon Horman <horms@verge.net.au>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Thu Apr 23 10:11:33 2009 +0100 (2009-04-23) |
parents | 4dd8ed253ee0 |
children | 855e2f5ddb67 |
files | tools/python/xen/xend/XendConfig.py tools/python/xen/xend/server/pciif.py tools/python/xen/xm/create.py |
line diff
1.1 --- a/tools/python/xen/xend/XendConfig.py Thu Apr 23 10:10:11 2009 +0100 1.2 +++ b/tools/python/xen/xend/XendConfig.py Thu Apr 23 10:11:33 2009 +0100 1.3 @@ -1285,7 +1285,7 @@ class XendConfig(dict): 1.4 dpci_record = { 1.5 'VM': self['uuid'], 1.6 'PPCI': ppci_uuid, 1.7 - 'hotplug_slot': pci_dev.get('vslot', 0) 1.8 + 'hotplug_slot': pci_dev.get('requested_vslot', 0) 1.9 } 1.10 1.11 dpci_opts = pci_dev.get('opts') 1.12 @@ -1847,7 +1847,7 @@ 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('requested_vslot', 0) 1.18 } 1.19 1.20 dpci_opts = pci_dev.get('opts')
2.1 --- a/tools/python/xen/xend/server/pciif.py Thu Apr 23 10:10:11 2009 +0100 2.2 +++ b/tools/python/xen/xend/server/pciif.py Thu Apr 23 10:11:33 2009 +0100 2.3 @@ -79,7 +79,7 @@ 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 + requested_vslot = parse_hex(pci_config.get('requested_vslot', 0)) 2.9 2.10 opts = pci_config.get('opts', '') 2.11 if len(opts) > 0: 2.12 @@ -90,7 +90,7 @@ class PciController(DevController): 2.13 back['dev-%i' % pcidevid] = "%04x:%02x:%02x.%01x" % \ 2.14 (domain, bus, slot, func) 2.15 back['uuid-%i' % pcidevid] = pci_config.get('uuid', '') 2.16 - back['vslot-%i' % pcidevid] = "%02x" % vslot 2.17 + back['vslot-%i' % pcidevid] = "%02x" % requested_vslot 2.18 pcidevid += 1 2.19 2.20 if vslots != "":
3.1 --- a/tools/python/xen/xm/create.py Thu Apr 23 10:10:11 2009 +0100 3.2 +++ b/tools/python/xen/xm/create.py Thu Apr 23 10:11:33 2009 +0100 3.3 @@ -710,7 +710,8 @@ def configure_pci(config_devs, vals): 3.4 config_pci_opts.append([k, d[k]]) 3.5 3.6 config_pci_bdf = ['dev', ['domain', domain], ['bus', bus], \ 3.7 - ['slot', slot], ['func', func], ['vslot', vslot]] 3.8 + ['slot', slot], ['func', func], 3.9 + ['requested_vslot', vslot]] 3.10 map(f, d.keys()) 3.11 if len(config_pci_opts)>0: 3.12 config_pci_bdf.append(['opts', config_pci_opts])