On 10/2/18 8:55 AM, Denis V. Lunev wrote:
According to PCI specification subsystem id and subsystem vendor id are optinal and could be abscent in Type1 header and can be found on
s/optinal/optional/ s/abscent/absent/
different offsets within Type0 and Type2 headers. Thus we should make this data optional in struct PciDeviceId and skip reporting them via HMP if the information is not available. Additional (wrong information) about PCI bridges (Type1 devices) has been added in 5383a705 and fortunately not released. This patch fixes that problem. The problem was spotted by Markus. Signed-off-by: Denis V. Lunev <d...@openvz.org> CC: "Dr. David Alan Gilbert" <dgilb...@redhat.com> CC: Eric Blake <ebl...@redhat.com> CC: Markus Armbruster <arm...@redhat.com> --- hmp.c | 6 ++++-- hw/pci/pci.c | 13 ++++++++++--- qapi/misc.json | 4 ++-- 3 files changed, 16 insertions(+), 7 deletions(-)
Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org