pci.json (2ecfc0657afa5d29a373271b342f704a1a3c6737) pci.json (a937b6aa739f65f2cae2ad9a7eb65a309ad2a359)
1# -*- Mode: Python -*-
2# vim: filetype=python
3#
4# This work is licensed under the terms of the GNU GPL, version 2 or later.
5# See the COPYING file in the top-level directory.
6# SPDX-License-Identifier: GPL-2.0-or-later
7
8##

--- 15 unchanged lines hidden (view full) ---

24
25##
26# @PciMemoryRegion:
27#
28# Information about a PCI device I/O region.
29#
30# @bar: the index of the Base Address Register for this region
31#
1# -*- Mode: Python -*-
2# vim: filetype=python
3#
4# This work is licensed under the terms of the GNU GPL, version 2 or later.
5# See the COPYING file in the top-level directory.
6# SPDX-License-Identifier: GPL-2.0-or-later
7
8##

--- 15 unchanged lines hidden (view full) ---

24
25##
26# @PciMemoryRegion:
27#
28# Information about a PCI device I/O region.
29#
30# @bar: the index of the Base Address Register for this region
31#
32# @type: - 'io' if the region is a PIO region
33# - 'memory' if the region is a MMIO region
32# @type:
33# - 'io' if the region is a PIO region
34# - 'memory' if the region is a MMIO region
34#
35# @size: memory size
36#
37# @prefetch: if @type is 'memory', true if the memory is prefetchable
38#
39# @mem_type_64: if @type is 'memory', true if the BAR is 64-bit
40#
41# Since: 0.14
42##
43{ 'struct': 'PciMemoryRegion',
44 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
45 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
46
47##
48# @PciBusInfo:
49#
50# Information about a bus of a PCI Bridge device
51#
35#
36# @size: memory size
37#
38# @prefetch: if @type is 'memory', true if the memory is prefetchable
39#
40# @mem_type_64: if @type is 'memory', true if the BAR is 64-bit
41#
42# Since: 0.14
43##
44{ 'struct': 'PciMemoryRegion',
45 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
46 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
47
48##
49# @PciBusInfo:
50#
51# Information about a bus of a PCI Bridge device
52#
52# @number: primary bus interface number. This should be the number of the
53# bus the device resides on.
53# @number: primary bus interface number. This should be the number of
54# the bus the device resides on.
54#
55#
55# @secondary: secondary bus interface number. This is the number of the
56# main bus for the bridge
56# @secondary: secondary bus interface number. This is the number of
57# the main bus for the bridge
57#
58# @subordinate: This is the highest number bus that resides below the
58#
59# @subordinate: This is the highest number bus that resides below the
59# bridge.
60# bridge.
60#
61# @io_range: The PIO range for all devices on this bridge
62#
63# @memory_range: The MMIO range for all devices on this bridge
64#
61#
62# @io_range: The PIO range for all devices on this bridge
63#
64# @memory_range: The MMIO range for all devices on this bridge
65#
65# @prefetchable_range: The range of prefetchable MMIO for all devices on
66# this bridge
66# @prefetchable_range: The range of prefetchable MMIO for all devices
67# on this bridge
67#
68# Since: 2.4
69##
70{ 'struct': 'PciBusInfo',
71 'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
72 'io_range': 'PciMemoryRange',
73 'memory_range': 'PciMemoryRange',
74 'prefetchable_range': 'PciMemoryRange' } }

--- 65 unchanged lines hidden (view full) ---

140# @irq_pin: the IRQ pin, zero means no IRQ (since 5.1)
141#
142# @qdev_id: the device name of the PCI device
143#
144# @pci_bridge: if the device is a PCI bridge, the bridge information
145#
146# @regions: a list of the PCI I/O regions associated with the device
147#
68#
69# Since: 2.4
70##
71{ 'struct': 'PciBusInfo',
72 'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
73 'io_range': 'PciMemoryRange',
74 'memory_range': 'PciMemoryRange',
75 'prefetchable_range': 'PciMemoryRange' } }

--- 65 unchanged lines hidden (view full) ---

141# @irq_pin: the IRQ pin, zero means no IRQ (since 5.1)
142#
143# @qdev_id: the device name of the PCI device
144#
145# @pci_bridge: if the device is a PCI bridge, the bridge information
146#
147# @regions: a list of the PCI I/O regions associated with the device
148#
148# Notes: the contents of @class_info.desc are not stable and should only be
149# treated as informational.
149# Notes: the contents of @class_info.desc are not stable and should
150# only be treated as informational.
150#
151# Since: 0.14
152##
153{ 'struct': 'PciDeviceInfo',
154 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
155 'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
156 '*irq': 'int', 'irq_pin': 'int', 'qdev_id': 'str',
157 '*pci_bridge': 'PciBridgeInfo', 'regions': ['PciMemoryRegion'] }}

--- 11 unchanged lines hidden (view full) ---

169##
170{ 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
171
172##
173# @query-pci:
174#
175# Return information about the PCI bus topology of the guest.
176#
151#
152# Since: 0.14
153##
154{ 'struct': 'PciDeviceInfo',
155 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
156 'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
157 '*irq': 'int', 'irq_pin': 'int', 'qdev_id': 'str',
158 '*pci_bridge': 'PciBridgeInfo', 'regions': ['PciMemoryRegion'] }}

--- 11 unchanged lines hidden (view full) ---

170##
171{ 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
172
173##
174# @query-pci:
175#
176# Return information about the PCI bus topology of the guest.
177#
177# Returns: a list of @PciInfo for each PCI bus. Each bus is
178# represented by a json-object, which has a key with a json-array of
179# all PCI devices attached to it. Each device is represented by a
180# json-object.
178# Returns: a list of @PciInfo for each PCI bus. Each bus is
179# represented by a json-object, which has a key with a json-array
180# of all PCI devices attached to it. Each device is represented
181# by a json-object.
181#
182# Since: 0.14
183#
184# Example:
185#
186# -> { "execute": "query-pci" }
187# <- { "return": [
188# {

--- 116 unchanged lines hidden (view full) ---

305# }
306# ]
307# }
308# ]
309# }
310# ]
311# }
312#
182#
183# Since: 0.14
184#
185# Example:
186#
187# -> { "execute": "query-pci" }
188# <- { "return": [
189# {

--- 116 unchanged lines hidden (view full) ---

306# }
307# ]
308# }
309# ]
310# }
311# ]
312# }
313#
313# Note: This example has been shortened as the real response is too long.
314#
314# Note: This example has been shortened as the real response is too
315# long.
315##
316{ 'command': 'query-pci', 'returns': ['PciInfo'] }
316##
317{ 'command': 'query-pci', 'returns': ['PciInfo'] }