]> git.proxmox.com Git - mirror_qemu.git/commit
qmp, hmp: make subsystem/system-vendor identities optional
authorDenis V. Lunev <den@openvz.org>
Tue, 2 Oct 2018 13:55:38 +0000 (16:55 +0300)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Thu, 11 Oct 2018 18:58:26 +0000 (19:58 +0100)
commit18613dc6d9f2f33c333440fecab4c584281305ee
tree0d20da3fa631c76f95e0b0a690c683368ef33384
parent5ce43896e1679e706db1562d0e2d86ad428ed1e6
qmp, hmp: make subsystem/system-vendor identities optional

According to PCI specification, subsystem id and subsystem vendor id
are present only in type 0 and type 2 headers (at different offsets),
but not in type 1 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 <den@openvz.org>
CC: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
CC: Eric Blake <eblake@redhat.com>
CC: Markus Armbruster <armbru@redhat.com>
Message-Id: <20181002135538.12113-1-den@openvz.org>
Reported-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
hmp.c
hw/pci/pci.c
qapi/misc.json