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-devel

[Xen-devel] [PATCH] xl, fix for short BDF (without domain specified)

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] xl, fix for short BDF (without domain specified)
From: Sergey Tovpeko <tsv.devel@xxxxxxxxx>
Date: Wed, 07 Jul 2010 12:27:40 +0400
Delivery-date: Wed, 07 Jul 2010 01:31:32 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type; bh=aO4p59kV7Gqsi/8eQnQoS+8pYgwxL79r6x8kkoW7Jyk=; b=S37AS8ZLsSf6RILRMMZhyLsYhHoBRHZyX9ERforJ/c7dpKEjQsjhGOkgKZxyaYG523 D54ktRtcitR37v7VUildXbXn4/cnTW00jnJHJnlmmAZkZikr+CrirNJTFlHmb+uoyu0g iqCc243LQN0pF40nhvcddJIqWx4Z3dr9vzcl4=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type; b=OSZ6U/oidJRw6Ymc5GB9Go2gPKLUNMJGFmejsLzYjJh2ZI2PdwndnUL3brgcGbeHqj J6nJV8TmhTJOqRVKNsqT43is0xxgyqFmeNnqydLfqh+rjv2hnyy1yodsvcex3dQjLLBF jrKuXgvMcBiKPdMO++kG+JIw9K2TLzx7sZn3E=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103)
Hi,

this patch fixes cases where an user sets pci device not mentioning its domain, ex.
pci = ['01:00.0']

At now, xl recognizes this string as
domain = 1,
bus = 0,
device = 0
func = 0

commit a5ed8a3a59d5abeb9dabfdf2d31fa524cf304dee
Author: Sergey Tovpeko <tovpeko@xxxxxxxxx>
Date:   Tue Jul 6 23:31:50 2010 +0400

    Check that BDF have been parsed correctly.
    
    Before that fix, BDF could be parsed incorrectly if user omitted domain in 
it.

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 208ecd6..9be1cbb 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -827,7 +827,7 @@ skip_vfb:
             p = strtok(buf2, ",");
             if (!p)
                 goto skip_pci;
-            if (!sscanf(p, PCI_BDF_VDEVFN, &domain, &bus, &dev, &func, 
&vdevfn)) {
+            if (sscanf(p, PCI_BDF_VDEVFN, &domain, &bus, &dev, &func, &vdevfn) 
< 4) {
                 sscanf(p, "%02x:%02x.%01x@%02x", &bus, &dev, &func, &vdevfn);
                 domain = 0;
             }
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>