Files
hiperiso/host
vasilito acc2d93307 fix: PCI summary JSON parser to match real QEMU info pci output
The awk patterns in hw_gen_pci_json() targeted a hypothetical output format
that never matched QEMU's actual HMP 'info pci' response:

- /^Bus / anchored to line start, but QEMU outputs '  Bus  ' (2 leading spaces)
- /vendor_id = / expected 'vendor_id = 0x8086', but QEMU prints 'PCI device 8086:2922'
- /device_id = / expected separate line, but vendor:device are on the same line
- /class = / expected 'class = 0x010601', but QEMU prints 'SATA controller:' or 'Class 0106:'
- IRQ field expected 'IRQ 0.' but QEMU prints 'IRQ 5, pin A'

Result: pci_summary.json was always invalid JSON with orphaned key-value pairs.

Fix verified against QEMU source (pci-hmp-cmds.c:31-51) and tested with
realistic 4-device output: all devices correctly parsed with bus/dev/fn,
vendor_id, device_id, and IRQ fields.

Found by: 5-agent parallel review (QA execution agent)
2026-06-30 14:51:06 +03:00
..