Please sign in to comment.
pyjailhouse: sysfs_parser: Add more precise length of some extended caps
I often run into situations where Linux tries to write to some extended capabilities. E.g., Linux wants to clear Advanced Error Reporting (ERR) registers when probing for a device. At the moment, the crash dump of the cell is hard to interprete, as it remains unclear if the access is inside a capability, or if the device just accesses some PCI config space (e.g., accesses beyond PCI spec). At the moment, all extended capabilities have a fixed length of 4, which supports the confusion. Four bytes only cover the header of the capability. This patch calculates the correct length of PCI caps for the configuration file -- at least of some capabilities. For some extended caps this is pretty easy, as they have a fixed length. Nevertheless, other vary in their length. In some cases, it's pretty easy (VNDR, ACS), in other cases it's not worth it (VC, VC9) due to their complexity. Caps that aren't handle still result in a length of 4. Additionally, switch to a hexadecimal representation of the length of PCI caps in config files. Signed-off-by: Ralf Ramsauer <email@example.com> Signed-off-by: Jan Kiszka <firstname.lastname@example.org>
- Loading branch information...
Showing with 32 additions and 5 deletions.