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 <[email protected]>
CC: "Dr. David Alan Gilbert" <[email protected]>
CC: Eric Blake <[email protected]>
CC: Markus Armbruster <[email protected]>
---
  hmp.c          |  6 ++++--
  hw/pci/pci.c   | 13 ++++++++++---
  qapi/misc.json |  4 ++--
  3 files changed, 16 insertions(+), 7 deletions(-)


Reviewed-by: Eric Blake <[email protected]>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Reply via email to