aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hmp.c2
-rw-r--r--hw/pci/pci.c3
-rw-r--r--qapi/misc.json7
3 files changed, 11 insertions, 1 deletions
diff --git a/hmp.c b/hmp.c
index 52a4279e51..80a95fc269 100644
--- a/hmp.c
+++ b/hmp.c
@@ -824,6 +824,8 @@ static void hmp_info_pci_device(Monitor *mon, const PciDeviceInfo *dev)
monitor_printf(mon, ": PCI device %04" PRIx64 ":%04" PRIx64 "\n",
dev->id->vendor, dev->id->device);
+ monitor_printf(mon, " PCI subsystem %04" PRIx64 ":%04" PRIx64 "\n",
+ dev->id->subsystem_vendor, dev->id->subsystem);
if (dev->has_irq) {
monitor_printf(mon, " IRQ %" PRId64 ".\n", dev->irq);
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 80bc45930d..51d0dec466 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -1737,6 +1737,9 @@ static PciDeviceInfo *qmp_query_pci_device(PCIDevice *dev, PCIBus *bus,
info->id = g_new0(PciDeviceId, 1);
info->id->vendor = pci_get_word(dev->config + PCI_VENDOR_ID);
info->id->device = pci_get_word(dev->config + PCI_DEVICE_ID);
+ info->id->subsystem = pci_get_word(dev->config + PCI_SUBSYSTEM_ID);
+ info->id->subsystem_vendor =
+ pci_get_word(dev->config + PCI_SUBSYSTEM_VENDOR_ID);
info->regions = qmp_query_pci_regions(dev);
info->qdev_id = g_strdup(dev->qdev.id ? dev->qdev.id : "");
diff --git a/qapi/misc.json b/qapi/misc.json
index d450cfef21..ada9af5add 100644
--- a/qapi/misc.json
+++ b/qapi/misc.json
@@ -832,10 +832,15 @@
#
# @vendor: the PCI vendor id
#
+# @subsystem: the PCI subsystem id (since 3.1)
+#
+# @subsystem-vendor: the PCI subsystem vendor id (since 3.1)
+#
# Since: 2.4
##
{ 'struct': 'PciDeviceId',
- 'data': {'device': 'int', 'vendor': 'int'} }
+ 'data': {'device': 'int', 'vendor': 'int', 'subsystem': 'int',
+ 'subsystem-vendor': 'int'} }
##
# @PciDeviceInfo: