From 12fcf49c1a016cc05638b965f4e7b909794bffa2 Mon Sep 17 00:00:00 2001 From: Peter Xu Date: Tue, 17 Mar 2020 15:59:08 -0400 Subject: pci: Display PCI IRQ pin in "info pci" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 CC: Alex Williamson CC: Michael S. Tsirkin CC: Marcel Apfelbaum CC: Julia Suvorova CC: Markus Armbruster Signed-off-by: Peter Xu Message-Id: <20200317195908.283800-1-peterx@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Philippe Mathieu-Daudé Acked-by: Dr. David Alan Gilbert Acked-by: Markus Armbruster --- hw/pci/pci.c | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/pci') diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 1b88a32cf7..a60cf3ae3b 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]; -- cgit v1.2.3