aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/pci/pci.c1
-rw-r--r--monitor/hmp-cmds.c3
-rw-r--r--qapi/misc.json6
3 files changed, 7 insertions, 3 deletions
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 1b88a32..a60cf3a 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -1776,6 +1776,7 @@ static PciDeviceInfo *qmp_query_pci_device(PCIDevice *dev, PCIBus *bus,
info->regions = qmp_query_pci_regions(dev);
info->qdev_id = g_strdup(dev->qdev.id ? dev->qdev.id : "");
+ info->irq_pin = dev->config[PCI_INTERRUPT_PIN];
if (dev->config[PCI_INTERRUPT_PIN] != 0) {
info->has_irq = true;
info->irq = dev->config[PCI_INTERRUPT_LINE];
diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
index 9c61e76..e03adf0 100644
--- a/monitor/hmp-cmds.c
+++ b/monitor/hmp-cmds.c
@@ -688,7 +688,8 @@ static void hmp_info_pci_device(Monitor *mon, const PciDeviceInfo *dev)
}
if (dev->has_irq) {
- monitor_printf(mon, " IRQ %" PRId64 ".\n", dev->irq);
+ monitor_printf(mon, " IRQ %" PRId64 ", pin %c\n",
+ dev->irq, (char)('A' + dev->irq_pin - 1));
}
if (dev->has_pci_bridge) {
diff --git a/qapi/misc.json b/qapi/misc.json
index 99b90ac..a5a0beb 100644
--- a/qapi/misc.json
+++ b/qapi/misc.json
@@ -403,6 +403,8 @@
#
# @irq: if an IRQ is assigned to the device, the IRQ number
#
+# @irq_pin: the IRQ pin, zero means no IRQ (since 5.1)
+#
# @qdev_id: the device name of the PCI device
#
# @pci_bridge: if the device is a PCI bridge, the bridge information
@@ -417,8 +419,8 @@
{ 'struct': 'PciDeviceInfo',
'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
- '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
- 'regions': ['PciMemoryRegion']} }
+ '*irq': 'int', 'irq_pin': 'int', 'qdev_id': 'str',
+ '*pci_bridge': 'PciBridgeInfo', 'regions': ['PciMemoryRegion'] }}
##
# @PciInfo: