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] [qemu-xen-unstable] pass-through: only parse single BDFs

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [qemu-xen-unstable] pass-through: only parse single BDFs.
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Thu, 4 Jun 2009 21:40:57 -0700
Delivery-date: Thu, 11 Jun 2009 08:07:14 -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
commit 0a850285ce9949caa9f9bf519f20061d013d0134
Author: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Date:   Wed Jun 3 15:39:26 2009 +0100

    pass-through: only parse single BDFs.
    
    As of "qemu-xen: hot-plug PCI devices at boot-time", the BDF string
    that is parsed always contains a single bdf, not multiple bdf's delimited
    by a '-'.
    
    Cc: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
    Cc: Edwin Zhai <edwin.zhai@xxxxxxxxx>
    Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>
---
 hw/pass-through.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/hw/pass-through.c b/hw/pass-through.c
index cf04924..a848164 100644
--- a/hw/pass-through.c
+++ b/hw/pass-through.c
@@ -828,11 +828,11 @@ static int token_value(char *token)
     return strtol(token, NULL, 16);
 }
 
-static int next_bdf(char **str, int *seg, int *bus, int *dev, int *func,
-                    char **opt, int *vslot)
+static int parse_bdf(char **str, int *seg, int *bus, int *dev, int *func,
+                     char **opt, int *vslot)
 {
     char *token, *endptr;
-    const char *delim = ":.-";
+    const char *delim = ":.";
 
     if ( !(*str) ||
           ( !strchr(*str, ':') && !strchr(*str, '.')) )
@@ -948,7 +948,7 @@ int insert_to_pci_slot(char *bdf_slt)
     int seg, bus, dev, func, slot;
     char *opt;
 
-    if ( !next_bdf(&bdf_slt, &seg, &bus, &dev, &func, &opt, &slot) )
+    if ( !parse_bdf(&bdf_slt, &seg, &bus, &dev, &func, &opt, &slot) )
     {
         return -1;
     }
@@ -979,7 +979,7 @@ int bdf_to_slot(char *bdf_str)
     int seg, bus, dev, func, slot, i;
     char *opt;
 
-    if ( !next_bdf(&bdf_str, &seg, &bus, &dev, &func, &opt, &slot))
+    if ( !parse_bdf(&bdf_str, &seg, &bus, &dev, &func, &opt, &slot))
     {
         return -1;
     }
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [qemu-xen-unstable] pass-through: only parse single BDFs., Ian Jackson <=