WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] passthrough: Fix PCI hot-plug option pars

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] passthrough: Fix PCI hot-plug option parsing
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 15 May 2009 11:05:15 -0700
Delivery-date: Fri, 15 May 2009 11:05:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1242206915 -3600
# Node ID 07fbc48553e8024032a9f4764fd26afdafc4ce28
# Parent  2522cc95efd2f3fadf7342d18fe86e8f37f89c2a
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@xxxxxxxxxxxx>
---
 tools/python/xen/xend/XendDomainInfo.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -r 2522cc95efd2 -r 07fbc48553e8 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Mon May 11 13:52:04 2009 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py   Wed May 13 10:28:35 2009 +0100
@@ -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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] passthrough: Fix PCI hot-plug option parsing, Xen patchbot-unstable <=