diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-05-13 10:28:35 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-05-13 10:28:35 +0100 |
commit | 9f97da694dcdfeecf50221e7b1d3b7cdd01ab1ca (patch) | |
tree | 281d81e7500bfc2beadffba2c04b6475e06ac137 /tools | |
parent | 1930ad84e4ada52b1e7c6b1376840ddbd0371bb8 (diff) | |
download | xen-9f97da694dcdfeecf50221e7b1d3b7cdd01ab1ca.tar.gz xen-9f97da694dcdfeecf50221e7b1d3b7cdd01ab1ca.tar.bz2 xen-9f97da694dcdfeecf50221e7b1d3b7cdd01ab1ca.zip |
passthrough: Fix PCI hot-plug option parsing
When a PCI function is passed-through extra options may be passed
through.
In the case of boot-time PCI pass-through the documented format is:
[dom:]bus:dev.slot[@vslot][[,opt]...]
e.g.
00:01.00.1@7,msitranslate=3D1
In the case of PCI hot-plug the xm pci-attach command take the
following arguments:
[-o opt[,opt]...] [dom:]bus:dev.slot [vslot]
e.g.
-o msitranslate=3D1 00:01.00.1 7
These xm ends up passing these to xem-qemu as:
[dom:]bus:dev.slot[[,opt]...][@vslot]
e.g.
00:01.00.1,msitranslate=3D1@7
Note that the option and the vslot have are transposed when
compared to the format used by boot-time PCI pass-through.
The parser inside qemu-xen can only handle the format used by
boot-time PCI pass-through and because of this ignores
any options passed by hot-plug.
This patch alters format used by hot-plug to match the parser.
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/python/xen/xend/XendDomainInfo.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index fda94defea..c4492f6edd 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -706,12 +706,12 @@ class XendDomainInfo: config_opts = map(lambda (x, y): x+'='+y, config_opts) opts = ',' + reduce(lambda x, y: x+','+y, config_opts) - bdf_str = "%s:%s:%s.%s%s@%s" % (new_dev['domain'], + bdf_str = "%s:%s:%s.%s@%s%s" % (new_dev['domain'], new_dev['bus'], new_dev['slot'], new_dev['func'], - opts, - new_dev['vslot']) + new_dev['vslot'], + opts) self.image.signalDeviceModel('pci-ins', 'pci-inserted', bdf_str) vslot = xstransact.Read("/local/domain/0/device-model/%i/parameter" |