aboutsummaryrefslogtreecommitdiff
path: root/hw/pci
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2020-03-17 15:59:08 -0400
committerMichael S. Tsirkin <mst@redhat.com>2020-06-12 10:17:06 -0400
commit12fcf49c1a016cc05638b965f4e7b909794bffa2 (patch)
treeabefa85bce31d7564f721656ca89786b1ab55412 /hw/pci
parent62925fd2b8b778539607b321216cd54897ddb63a (diff)
downloadqemu-12fcf49c1a016cc05638b965f4e7b909794bffa2.zip
qemu-12fcf49c1a016cc05638b965f4e7b909794bffa2.tar.gz
qemu-12fcf49c1a016cc05638b965f4e7b909794bffa2.tar.bz2
pci: Display PCI IRQ pin in "info pci"
Sometimes it would be good to be able to read the pin number along with the IRQ number allocated. Since we'll dump the IRQ number, no reason to not dump the pin information. For example, the vfio-pci device will overwrite the pin with the hardware pin number. It would be nice to know the pin number of one assigned device from QMP/HMP. CC: Dr. David Alan Gilbert <dgilbert@redhat.com> CC: Alex Williamson <alex.williamson@redhat.com> CC: Michael S. Tsirkin <mst@redhat.com> CC: Marcel Apfelbaum <marcel.apfelbaum@gmail.com> CC: Julia Suvorova <jusual@redhat.com> CC: Markus Armbruster <armbru@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <20200317195908.283800-1-peterx@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Acked-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'hw/pci')
-rw-r--r--hw/pci/pci.c1
1 files changed, 1 insertions, 0 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];