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] Calculation of MSI-X table size needs to

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Calculation of MSI-X table size needs to be masked.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 05 May 2008 02:30:08 -0700
Delivery-date: Mon, 05 May 2008 02:30:07 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 1209978764 -3600
# Node ID eb046aff9f17471983a165d05e53fb190ee27a34
# Parent  bb49aeae1ff24477f066c19aaf032f740bed369e
Calculation of MSI-X table size needs to be masked.

Signed-off-by: Espen Skoglund <espen.skoglund@xxxxxxxxxxxxx>
---
 tools/python/xen/util/pci.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff -r bb49aeae1ff2 -r eb046aff9f17 tools/python/xen/util/pci.py
--- a/tools/python/xen/util/pci.py      Sun May 04 08:32:00 2008 +0100
+++ b/tools/python/xen/util/pci.py      Mon May 05 10:12:44 2008 +0100
@@ -30,6 +30,7 @@ PCI_STATUS_OFFSET = 0x6
 PCI_STATUS_OFFSET = 0x6
 PCI_CAP_OFFSET = 0x34
 MSIX_BIR_MASK = 0x7
+MSIX_SIZE_MASK = 0x3ff
 
 #Calculate PAGE_SHIFT: number of bits to shift an address to get the page 
number
 PAGE_SIZE = resource.getpagesize()
@@ -120,8 +121,9 @@ class PciDevice:
                         message_cont_lo = ord(conf_file.read(1))
                         message_cont_hi = ord(conf_file.read(1))
                         self.msix=1
-                        self.msix_entries = message_cont_lo + \
-                                            message_cont_hi << 8
+                        self.msix_entries = (message_cont_lo + \
+                                             message_cont_hi << 8) \
+                                             & MSIX_SIZE_MASK
                         t_off=conf_file.read(4)
                         p_off=conf_file.read(4)
                         self.table_offset=ord(t_off[0]) | (ord(t_off[1])<<8) | 
\

_______________________________________________
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] Calculation of MSI-X table size needs to be masked., Xen patchbot-unstable <=