mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-09-09 08:17:53 -06:00
qmp-commands: move 'query-pci' doc to schema
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
f504e3dc21
commit
3fc3aa6de9
2 changed files with 138 additions and 209 deletions
|
@ -1945,214 +1945,6 @@ Example:
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
query-pci
|
|
||||||
---------
|
|
||||||
|
|
||||||
PCI buses and devices information.
|
|
||||||
|
|
||||||
The returned value is a json-array of all buses. Each bus is represented by
|
|
||||||
a json-object, which has a key with a json-array of all PCI devices attached
|
|
||||||
to it. Each device is represented by a json-object.
|
|
||||||
|
|
||||||
The bus json-object contains the following:
|
|
||||||
|
|
||||||
- "bus": bus number (json-int)
|
|
||||||
- "devices": a json-array of json-objects, each json-object represents a
|
|
||||||
PCI device
|
|
||||||
|
|
||||||
The PCI device json-object contains the following:
|
|
||||||
|
|
||||||
- "bus": identical to the parent's bus number (json-int)
|
|
||||||
- "slot": slot number (json-int)
|
|
||||||
- "function": function number (json-int)
|
|
||||||
- "class_info": a json-object containing:
|
|
||||||
- "desc": device class description (json-string, optional)
|
|
||||||
- "class": device class number (json-int)
|
|
||||||
- "id": a json-object containing:
|
|
||||||
- "device": device ID (json-int)
|
|
||||||
- "vendor": vendor ID (json-int)
|
|
||||||
- "irq": device's IRQ if assigned (json-int, optional)
|
|
||||||
- "qdev_id": qdev id string (json-string)
|
|
||||||
- "pci_bridge": It's a json-object, only present if this device is a
|
|
||||||
PCI bridge, contains:
|
|
||||||
- "bus": bus number (json-int)
|
|
||||||
- "secondary": secondary bus number (json-int)
|
|
||||||
- "subordinate": subordinate bus number (json-int)
|
|
||||||
- "io_range": I/O memory range information, a json-object with the
|
|
||||||
following members:
|
|
||||||
- "base": base address, in bytes (json-int)
|
|
||||||
- "limit": limit address, in bytes (json-int)
|
|
||||||
- "memory_range": memory range information, a json-object with the
|
|
||||||
following members:
|
|
||||||
- "base": base address, in bytes (json-int)
|
|
||||||
- "limit": limit address, in bytes (json-int)
|
|
||||||
- "prefetchable_range": Prefetchable memory range information, a
|
|
||||||
json-object with the following members:
|
|
||||||
- "base": base address, in bytes (json-int)
|
|
||||||
- "limit": limit address, in bytes (json-int)
|
|
||||||
- "devices": a json-array of PCI devices if there's any attached, each
|
|
||||||
each element is represented by a json-object, which contains
|
|
||||||
the same members of the 'PCI device json-object' described
|
|
||||||
above (optional)
|
|
||||||
- "regions": a json-array of json-objects, each json-object represents a
|
|
||||||
memory region of this device
|
|
||||||
|
|
||||||
The memory range json-object contains the following:
|
|
||||||
|
|
||||||
- "base": base memory address (json-int)
|
|
||||||
- "limit": limit value (json-int)
|
|
||||||
|
|
||||||
The region json-object can be an I/O region or a memory region, an I/O region
|
|
||||||
json-object contains the following:
|
|
||||||
|
|
||||||
- "type": "io" (json-string, fixed)
|
|
||||||
- "bar": BAR number (json-int)
|
|
||||||
- "address": memory address (json-int)
|
|
||||||
- "size": memory size (json-int)
|
|
||||||
|
|
||||||
A memory region json-object contains the following:
|
|
||||||
|
|
||||||
- "type": "memory" (json-string, fixed)
|
|
||||||
- "bar": BAR number (json-int)
|
|
||||||
- "address": memory address (json-int)
|
|
||||||
- "size": memory size (json-int)
|
|
||||||
- "mem_type_64": true or false (json-bool)
|
|
||||||
- "prefetch": true or false (json-bool)
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
-> { "execute": "query-pci" }
|
|
||||||
<- {
|
|
||||||
"return":[
|
|
||||||
{
|
|
||||||
"bus":0,
|
|
||||||
"devices":[
|
|
||||||
{
|
|
||||||
"bus":0,
|
|
||||||
"qdev_id":"",
|
|
||||||
"slot":0,
|
|
||||||
"class_info":{
|
|
||||||
"class":1536,
|
|
||||||
"desc":"Host bridge"
|
|
||||||
},
|
|
||||||
"id":{
|
|
||||||
"device":32902,
|
|
||||||
"vendor":4663
|
|
||||||
},
|
|
||||||
"function":0,
|
|
||||||
"regions":[
|
|
||||||
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"bus":0,
|
|
||||||
"qdev_id":"",
|
|
||||||
"slot":1,
|
|
||||||
"class_info":{
|
|
||||||
"class":1537,
|
|
||||||
"desc":"ISA bridge"
|
|
||||||
},
|
|
||||||
"id":{
|
|
||||||
"device":32902,
|
|
||||||
"vendor":28672
|
|
||||||
},
|
|
||||||
"function":0,
|
|
||||||
"regions":[
|
|
||||||
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"bus":0,
|
|
||||||
"qdev_id":"",
|
|
||||||
"slot":1,
|
|
||||||
"class_info":{
|
|
||||||
"class":257,
|
|
||||||
"desc":"IDE controller"
|
|
||||||
},
|
|
||||||
"id":{
|
|
||||||
"device":32902,
|
|
||||||
"vendor":28688
|
|
||||||
},
|
|
||||||
"function":1,
|
|
||||||
"regions":[
|
|
||||||
{
|
|
||||||
"bar":4,
|
|
||||||
"size":16,
|
|
||||||
"address":49152,
|
|
||||||
"type":"io"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"bus":0,
|
|
||||||
"qdev_id":"",
|
|
||||||
"slot":2,
|
|
||||||
"class_info":{
|
|
||||||
"class":768,
|
|
||||||
"desc":"VGA controller"
|
|
||||||
},
|
|
||||||
"id":{
|
|
||||||
"device":4115,
|
|
||||||
"vendor":184
|
|
||||||
},
|
|
||||||
"function":0,
|
|
||||||
"regions":[
|
|
||||||
{
|
|
||||||
"prefetch":true,
|
|
||||||
"mem_type_64":false,
|
|
||||||
"bar":0,
|
|
||||||
"size":33554432,
|
|
||||||
"address":4026531840,
|
|
||||||
"type":"memory"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"prefetch":false,
|
|
||||||
"mem_type_64":false,
|
|
||||||
"bar":1,
|
|
||||||
"size":4096,
|
|
||||||
"address":4060086272,
|
|
||||||
"type":"memory"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"prefetch":false,
|
|
||||||
"mem_type_64":false,
|
|
||||||
"bar":6,
|
|
||||||
"size":65536,
|
|
||||||
"address":-1,
|
|
||||||
"type":"memory"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"bus":0,
|
|
||||||
"qdev_id":"",
|
|
||||||
"irq":11,
|
|
||||||
"slot":4,
|
|
||||||
"class_info":{
|
|
||||||
"class":1280,
|
|
||||||
"desc":"RAM controller"
|
|
||||||
},
|
|
||||||
"id":{
|
|
||||||
"device":6900,
|
|
||||||
"vendor":4098
|
|
||||||
},
|
|
||||||
"function":0,
|
|
||||||
"regions":[
|
|
||||||
{
|
|
||||||
"bar":0,
|
|
||||||
"size":32,
|
|
||||||
"address":49280,
|
|
||||||
"type":"io"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
Note: This example has been shortened as the real response is too long.
|
|
||||||
|
|
||||||
query-command-line-options
|
query-command-line-options
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
|
|
139
qapi-schema.json
139
qapi-schema.json
|
@ -1835,6 +1835,8 @@
|
||||||
# @type: 'io' if the region is a PIO region
|
# @type: 'io' if the region is a PIO region
|
||||||
# 'memory' if the region is a MMIO region
|
# 'memory' if the region is a MMIO region
|
||||||
#
|
#
|
||||||
|
# @size: memory size
|
||||||
|
#
|
||||||
# @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
|
# @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
|
||||||
#
|
#
|
||||||
# @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
|
# @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
|
||||||
|
@ -1968,9 +1970,144 @@
|
||||||
#
|
#
|
||||||
# Return information about the PCI bus topology of the guest.
|
# Return information about the PCI bus topology of the guest.
|
||||||
#
|
#
|
||||||
# Returns: a list of @PciInfo for each PCI bus
|
# Returns: a list of @PciInfo for each PCI bus. Each bus is
|
||||||
|
# represented by a json-object, which has a key with a json-array of
|
||||||
|
# all PCI devices attached to it. Each device is represented by a
|
||||||
|
# json-object.
|
||||||
#
|
#
|
||||||
# Since: 0.14.0
|
# Since: 0.14.0
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
#
|
||||||
|
# -> { "execute": "query-pci" }
|
||||||
|
# <- { "return": [
|
||||||
|
# {
|
||||||
|
# "bus": 0,
|
||||||
|
# "devices": [
|
||||||
|
# {
|
||||||
|
# "bus": 0,
|
||||||
|
# "qdev_id": "",
|
||||||
|
# "slot": 0,
|
||||||
|
# "class_info": {
|
||||||
|
# "class": 1536,
|
||||||
|
# "desc": "Host bridge"
|
||||||
|
# },
|
||||||
|
# "id": {
|
||||||
|
# "device": 32902,
|
||||||
|
# "vendor": 4663
|
||||||
|
# },
|
||||||
|
# "function": 0,
|
||||||
|
# "regions": [
|
||||||
|
# ]
|
||||||
|
# },
|
||||||
|
# {
|
||||||
|
# "bus": 0,
|
||||||
|
# "qdev_id": "",
|
||||||
|
# "slot": 1,
|
||||||
|
# "class_info": {
|
||||||
|
# "class": 1537,
|
||||||
|
# "desc": "ISA bridge"
|
||||||
|
# },
|
||||||
|
# "id": {
|
||||||
|
# "device": 32902,
|
||||||
|
# "vendor": 28672
|
||||||
|
# },
|
||||||
|
# "function": 0,
|
||||||
|
# "regions": [
|
||||||
|
# ]
|
||||||
|
# },
|
||||||
|
# {
|
||||||
|
# "bus": 0,
|
||||||
|
# "qdev_id": "",
|
||||||
|
# "slot": 1,
|
||||||
|
# "class_info": {
|
||||||
|
# "class": 257,
|
||||||
|
# "desc": "IDE controller"
|
||||||
|
# },
|
||||||
|
# "id": {
|
||||||
|
# "device": 32902,
|
||||||
|
# "vendor": 28688
|
||||||
|
# },
|
||||||
|
# "function": 1,
|
||||||
|
# "regions": [
|
||||||
|
# {
|
||||||
|
# "bar": 4,
|
||||||
|
# "size": 16,
|
||||||
|
# "address": 49152,
|
||||||
|
# "type": "io"
|
||||||
|
# }
|
||||||
|
# ]
|
||||||
|
# },
|
||||||
|
# {
|
||||||
|
# "bus": 0,
|
||||||
|
# "qdev_id": "",
|
||||||
|
# "slot": 2,
|
||||||
|
# "class_info": {
|
||||||
|
# "class": 768,
|
||||||
|
# "desc": "VGA controller"
|
||||||
|
# },
|
||||||
|
# "id": {
|
||||||
|
# "device": 4115,
|
||||||
|
# "vendor": 184
|
||||||
|
# },
|
||||||
|
# "function": 0,
|
||||||
|
# "regions": [
|
||||||
|
# {
|
||||||
|
# "prefetch": true,
|
||||||
|
# "mem_type_64": false,
|
||||||
|
# "bar": 0,
|
||||||
|
# "size": 33554432,
|
||||||
|
# "address": 4026531840,
|
||||||
|
# "type": "memory"
|
||||||
|
# },
|
||||||
|
# {
|
||||||
|
# "prefetch": false,
|
||||||
|
# "mem_type_64": false,
|
||||||
|
# "bar": 1,
|
||||||
|
# "size": 4096,
|
||||||
|
# "address": 4060086272,
|
||||||
|
# "type": "memory"
|
||||||
|
# },
|
||||||
|
# {
|
||||||
|
# "prefetch": false,
|
||||||
|
# "mem_type_64": false,
|
||||||
|
# "bar": 6,
|
||||||
|
# "size": 65536,
|
||||||
|
# "address": -1,
|
||||||
|
# "type": "memory"
|
||||||
|
# }
|
||||||
|
# ]
|
||||||
|
# },
|
||||||
|
# {
|
||||||
|
# "bus": 0,
|
||||||
|
# "qdev_id": "",
|
||||||
|
# "irq": 11,
|
||||||
|
# "slot": 4,
|
||||||
|
# "class_info": {
|
||||||
|
# "class": 1280,
|
||||||
|
# "desc": "RAM controller"
|
||||||
|
# },
|
||||||
|
# "id": {
|
||||||
|
# "device": 6900,
|
||||||
|
# "vendor": 4098
|
||||||
|
# },
|
||||||
|
# "function": 0,
|
||||||
|
# "regions": [
|
||||||
|
# {
|
||||||
|
# "bar": 0,
|
||||||
|
# "size": 32,
|
||||||
|
# "address": 49280,
|
||||||
|
# "type": "io"
|
||||||
|
# }
|
||||||
|
# ]
|
||||||
|
# }
|
||||||
|
# ]
|
||||||
|
# }
|
||||||
|
# ]
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# Note: This example has been shortened as the real response is too long.
|
||||||
|
#
|
||||||
##
|
##
|
||||||
{ 'command': 'query-pci', 'returns': ['PciInfo'] }
|
{ 'command': 'query-pci', 'returns': ['PciInfo'] }
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue