qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] pci: Display PCI IRQ pin in "info pci"


From: Markus Armbruster
Subject: Re: [PATCH] pci: Display PCI IRQ pin in "info pci"
Date: Mon, 25 May 2020 10:19:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Peter Xu <address@hidden> writes:

> 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 <address@hidden>
> CC: Alex Williamson <address@hidden>
> CC: Michael S. Tsirkin <address@hidden>
> CC: Marcel Apfelbaum <address@hidden>
> CC: Julia Suvorova <address@hidden>
> CC: Markus Armbruster <address@hidden>
> Signed-off-by: Peter Xu <address@hidden>
> ---
>
> This helped me to debug an IRQ sharing issue, so may good to have it
> in master too.
> ---
[...]
> diff --git a/qapi/misc.json b/qapi/misc.json
> index c18fe681fb..f8d33ddb4e 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)
> +#

For the IRQ number, we make the member optional, and use "member absent"
for "no IRQ assigned".

For the IRQ pin, we make the member mandatory, and use zero value for
"no IRQ assigned".

Any particular reason for the difference?

>  # @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:




reply via email to

[Prev in Thread] Current Thread [Next in Thread]