[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [patch] qemu-xen: 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> --- This patch requires "qemu-xen: hot-plug PCI devices at boot-time" Index: ioemu-remote/hw/pass-through.c =================================================================== --- ioemu-remote.orig/hw/pass-through.c 2009-06-01 12:49:30.000000000 +1000 +++ ioemu-remote/hw/pass-through.c 2009-06-01 12:52:16.000000000 +1000 @@ -825,11 +825,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, '.')) ) @@ -945,7 +945,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; } @@ -976,7 +976,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; } _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |