Permalink
Browse files

pyjailhouse: sysfs_parser: Fix msix_address calculation

A missing brace caused 64-bit addresses to be truncated to 32-bit.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
  • Loading branch information...
jan-kiszka committed Jan 24, 2019
1 parent 8fe9186 commit a9aeb698f216fd274f4731bcc2bb90f0c638a1eb
Showing with 2 additions and 1 deletion.
  1. +2 −1 pyjailhouse/sysfs_parser.py
@@ -611,7 +611,8 @@ def parse_pcicaps(dir):
raise RuntimeError('Invalid MSI-X BAR found')
if (bar & 0x4) != 0:
bar |= struct.unpack('<I', f.read(4))[0] << 32
msix_address = (bar & 0xfffffffffffffff0) + table & 0xfffffff8
msix_address = \
(bar & 0xfffffffffffffff0) + (table & 0xfffffff8)
flags = PCICapability.RW
else:
# unknown/unhandled cap, mark its existence

0 comments on commit a9aeb69

Please sign in to comment.