[PATCH 1/3] vfio/pci: Fix sizing of DPA and THP express capabilities

2014-04-07 Thread Alex Williamson
When sizing the TPH capability we store the register containing the table size into the 'dword' variable, but then use the uninitialized 'byte' variable to analyze the size. The table size is also actually reported as an N-1 value, so correct sizing to account for this. The round_up() for both

[PATCH 1/3] vfio/pci: Fix sizing of DPA and THP express capabilities

2014-04-07 Thread Alex Williamson
When sizing the TPH capability we store the register containing the table size into the 'dword' variable, but then use the uninitialized 'byte' variable to analyze the size. The table size is also actually reported as an N-1 value, so correct sizing to account for this. The round_up() for both