ia64/xen-unstable

changeset 17574:eb046aff9f17

Calculation of MSI-X table size needs to be masked.

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon May 05 10:12:44 2008 +0100 (2008-05-05)
parents bb49aeae1ff2
children dab1301bc722
files tools/python/xen/util/pci.py
line diff
     1.1 --- a/tools/python/xen/util/pci.py	Sun May 04 08:32:00 2008 +0100
     1.2 +++ b/tools/python/xen/util/pci.py	Mon May 05 10:12:44 2008 +0100
     1.3 @@ -30,6 +30,7 @@ PCI_STATUS_CAP_MASK = 0x10
     1.4  PCI_STATUS_OFFSET = 0x6
     1.5  PCI_CAP_OFFSET = 0x34
     1.6  MSIX_BIR_MASK = 0x7
     1.7 +MSIX_SIZE_MASK = 0x3ff
     1.8  
     1.9  #Calculate PAGE_SHIFT: number of bits to shift an address to get the page number
    1.10  PAGE_SIZE = resource.getpagesize()
    1.11 @@ -120,8 +121,9 @@ class PciDevice:
    1.12                          message_cont_lo = ord(conf_file.read(1))
    1.13                          message_cont_hi = ord(conf_file.read(1))
    1.14                          self.msix=1
    1.15 -                        self.msix_entries = message_cont_lo + \
    1.16 -                                            message_cont_hi << 8
    1.17 +                        self.msix_entries = (message_cont_lo + \
    1.18 +                                             message_cont_hi << 8) \
    1.19 +                                             & MSIX_SIZE_MASK
    1.20                          t_off=conf_file.read(4)
    1.21                          p_off=conf_file.read(4)
    1.22                          self.table_offset=ord(t_off[0]) | (ord(t_off[1])<<8) | \