* [patch] passthrough: Fix PCI hot-plug option parsing
@ 2009-05-13 1:31 Simon Horman
2009-05-13 2:23 ` Masaki Kanno
0 siblings, 1 reply; 4+ messages in thread
From: Simon Horman @ 2009-05-13 1:31 UTC (permalink / raw)
To: xen-devel; +Cc: Yuji Shimada, Masaki Kanno, Keir Fraser, Qing He, Dexuan Cui
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=1
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=1 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=1@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.
Cc: Dexuan Cui <dexuan.cui@intel.com>
Cc: Qing He <qing.he@intel.com>
Cc: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
Cc: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
This bug does not appear be a recent regression.
This bug seems important enough to fix for 3.4, though
it could be argued that if it hasn't been noticed for a while
there aren't many (any?) users of this.
Index: xen-unstable.hg/tools/python/xen/xend/XendDomainInfo.py
===================================================================
--- xen-unstable.hg.orig/tools/python/xen/xend/XendDomainInfo.py 2009-05-13 11:07:38.000000000 +1000
+++ xen-unstable.hg/tools/python/xen/xend/XendDomainInfo.py 2009-05-13 11:11:36.000000000 +1000
@@ -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"
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] passthrough: Fix PCI hot-plug option parsing
2009-05-13 1:31 [patch] passthrough: Fix PCI hot-plug option parsing Simon Horman
@ 2009-05-13 2:23 ` Masaki Kanno
2009-05-13 3:02 ` Simon Horman
2009-05-13 3:05 ` [patch v2] " Simon Horman
0 siblings, 2 replies; 4+ messages in thread
From: Masaki Kanno @ 2009-05-13 2:23 UTC (permalink / raw)
To: Simon Horman, xen-devel; +Cc: Yuji Shimada, Keir Fraser, Qing He, Dexuan Cui
Hi Simon,
The following line includes tab indent.
>+ opts)
Best regards,
Kan
Wed, 13 May 2009 11:31:19 +1000, Simon Horman wrote:
>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=1
>
>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=1 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=1@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.
>
>Cc: Dexuan Cui <dexuan.cui@intel.com>
>Cc: Qing He <qing.he@intel.com>
>Cc: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
>Cc: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
>Signed-off-by: Simon Horman <horms@verge.net.au>
>
>---
>
>This bug does not appear be a recent regression.
>
>This bug seems important enough to fix for 3.4, though
>it could be argued that if it hasn't been noticed for a while
>there aren't many (any?) users of this.
>
>Index: xen-unstable.hg/tools/python/xen/xend/XendDomainInfo.py
>===================================================================
>--- xen-unstable.hg.orig/tools/python/xen/xend/XendDomainInfo.py 2009-05
-13
> 11:07:38.000000000 +1000
>+++ xen-unstable.hg/tools/python/xen/xend/XendDomainInfo.py 2009-05-13 11:
>11:36.000000000 +1000
>@@ -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"
>
>_______________________________________________
>Xen-devel mailing list
>Xen-devel@lists.xensource.com
>http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] passthrough: Fix PCI hot-plug option parsing
2009-05-13 2:23 ` Masaki Kanno
@ 2009-05-13 3:02 ` Simon Horman
2009-05-13 3:05 ` [patch v2] " Simon Horman
1 sibling, 0 replies; 4+ messages in thread
From: Simon Horman @ 2009-05-13 3:02 UTC (permalink / raw)
To: Masaki Kanno; +Cc: Yuji Shimada, xen-devel, Keir Fraser, Qing He, Dexuan Cui
On Wed, May 13, 2009 at 11:23:06AM +0900, Masaki Kanno wrote:
> Hi Simon,
>
> The following line includes tab indent.
>
> >+ opts)
Thanks, I will fix that.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [patch v2] passthrough: Fix PCI hot-plug option parsing
2009-05-13 2:23 ` Masaki Kanno
2009-05-13 3:02 ` Simon Horman
@ 2009-05-13 3:05 ` Simon Horman
1 sibling, 0 replies; 4+ messages in thread
From: Simon Horman @ 2009-05-13 3:05 UTC (permalink / raw)
To: Masaki Kanno; +Cc: Yuji Shimada, xen-devel, Keir Fraser, Qing He, Dexuan Cui
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=1
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=1 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=1@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.
Cc: Dexuan Cui <dexuan.cui@intel.com>
Cc: Qing He <qing.he@intel.com>
Cc: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
Cc: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
This bug does not appear be a recent regression.
This bug seems important enough to fix for 3.4, though
it could be argued that if it hasn't been noticed for a while
there aren't many (any?) users of this.
Wed, 13 May 2009 11:31:19 +1000
* Initial Public Release
Wed, 13 May 2009 13:04:06 +1000
* Remove tab from indentation
Index: xen-unstable.hg/tools/python/xen/xend/XendDomainInfo.py
===================================================================
--- xen-unstable.hg.orig/tools/python/xen/xend/XendDomainInfo.py 2009-05-13 11:37:00.000000000 +1000
+++ xen-unstable.hg/tools/python/xen/xend/XendDomainInfo.py 2009-05-13 11:37:24.000000000 +1000
@@ -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"
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-05-13 3:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-13 1:31 [patch] passthrough: Fix PCI hot-plug option parsing Simon Horman
2009-05-13 2:23 ` Masaki Kanno
2009-05-13 3:02 ` Simon Horman
2009-05-13 3:05 ` [patch v2] " Simon Horman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.