[PATCH kernel v2] vfio_pci: Test for extended capabilities if config space > 256 bytes

2016-04-28 Thread Alexey Kardashevskiy
PCI-Express spec says that reading 4 bytes at offset 100h should return zero if there is no extended capability so VFIO reads this dword to know if there are extended capabilities. However it is not always possible to access the extended space so generic PCI code in pci_cfg_space_size_ext()

[PATCH kernel v2] vfio_pci: Test for extended capabilities if config space > 256 bytes

2016-04-28 Thread Alexey Kardashevskiy
PCI-Express spec says that reading 4 bytes at offset 100h should return zero if there is no extended capability so VFIO reads this dword to know if there are extended capabilities. However it is not always possible to access the extended space so generic PCI code in pci_cfg_space_size_ext()