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/
Home Products Support Community News


[Xen-devel] [Patch] libxl: fix wrong mask of function number

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [Patch] libxl: fix wrong mask of function number
From: "Zhang, Yang Z" <yang.z.zhang@xxxxxxxxx>
Date: Thu, 2 Jun 2011 15:45:40 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "Keir Fraser \(keir.xen@xxxxxxxxx\)" <keir.xen@xxxxxxxxx>
Delivery-date: Thu, 02 Jun 2011 03:29:45 -0700
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
Thread-index: Acwg+RDftcylq6SLQFaKKnbfvOX/Eg==
Thread-topic: [Patch] libxl: fix wrong mask of function number
libxl: fix wrong mask of function number

Function number is 3 bits. So the mask should be 0x7 instead 0x3.

Signed-off-by: Yang Zhang <yang.z.zhang@xxxxxxxxx>

diff -r 221f431092c0 -r a7e3fce593db tools/libxl/libxl_pci.c
--- a/tools/libxl/libxl_pci.c   Wed Jun 01 16:50:16 2011 +0100
+++ b/tools/libxl/libxl_pci.c   Thu Jun 02 15:42:20 2011 +0800
@@ -48,7 +48,7 @@
     value = 0;
     value |= (pcidev->bus & 0xff) << 16;
     value |= (pcidev->dev & 0x1f) << (8+3);
-    value |= (pcidev->func & 0x3) << (8+0);
+    value |= (pcidev->func & 0x7) << (8+0);

     return value;

best regards

Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>