12 # Basic information about a given VirtIODevice
14 # @path: The VirtIODevice's canonical QOM path
16 # @name: Name of the VirtIODevice
21 { 'struct': 'VirtioInfo',
22 'data': { 'path': 'str',
28 # Returns a list of all realized VirtIODevices
31 # @unstable: This command is meant for debugging.
33 # Returns: List of gathered VirtIODevices
39 # -> { "execute": "x-query-virtio" }
42 # "name": "virtio-input",
43 # "path": "/machine/peripheral-anon/device[4]/virtio-backend"
46 # "name": "virtio-crypto",
47 # "path": "/machine/peripheral/crypto0/virtio-backend"
50 # "name": "virtio-scsi",
51 # "path": "/machine/peripheral-anon/device[2]/virtio-backend"
54 # "name": "virtio-net",
55 # "path": "/machine/peripheral-anon/device[1]/virtio-backend"
58 # "name": "virtio-serial",
59 # "path": "/machine/peripheral-anon/device[0]/virtio-backend"
66 { 'command': 'x-query-virtio',
67 'returns': [ 'VirtioInfo' ],
68 'features': [ 'unstable' ] }
73 # Information about a vhost device. This information will only be
74 # displayed if the vhost device is active.
76 # @n-mem-sections: vhost_dev n_mem_sections
78 # @n-tmp-sections: vhost_dev n_tmp_sections
80 # @nvqs: vhost_dev nvqs (number of virtqueues being used)
82 # @vq-index: vhost_dev vq_index
84 # @features: vhost_dev features
86 # @acked-features: vhost_dev acked_features
88 # @backend-features: vhost_dev backend_features
90 # @protocol-features: vhost_dev protocol_features
92 # @max-queues: vhost_dev max_queues
94 # @backend-cap: vhost_dev backend_cap
96 # @log-enabled: vhost_dev log_enabled flag
98 # @log-size: vhost_dev log_size
104 { 'struct': 'VhostStatus',
105 'data': { 'n-mem-sections': 'int',
106 'n-tmp-sections': 'int',
109 'features': 'VirtioDeviceFeatures',
110 'acked-features': 'VirtioDeviceFeatures',
111 'backend-features': 'VirtioDeviceFeatures',
112 'protocol-features': 'VhostDeviceProtocols',
113 'max-queues': 'uint64',
114 'backend-cap': 'uint64',
115 'log-enabled': 'bool',
116 'log-size': 'uint64' } }
121 # Full status of the virtio device with most VirtIODevice members.
122 # Also includes the full status of the corresponding vhost device
123 # if the vhost device is active.
125 # @name: VirtIODevice name
127 # @device-id: VirtIODevice ID
129 # @vhost-started: VirtIODevice vhost_started flag
131 # @guest-features: VirtIODevice guest_features
133 # @host-features: VirtIODevice host_features
135 # @backend-features: VirtIODevice backend_features
137 # @device-endian: VirtIODevice device_endian
139 # @num-vqs: VirtIODevice virtqueue count. This is the number of active
140 # virtqueues being used by the VirtIODevice.
142 # @status: VirtIODevice configuration status (VirtioDeviceStatus)
144 # @isr: VirtIODevice ISR
146 # @queue-sel: VirtIODevice queue_sel
148 # @vm-running: VirtIODevice vm_running flag
150 # @broken: VirtIODevice broken flag
152 # @disabled: VirtIODevice disabled flag
154 # @use-started: VirtIODevice use_started flag
156 # @started: VirtIODevice started flag
158 # @start-on-kick: VirtIODevice start_on_kick flag
160 # @disable-legacy-check: VirtIODevice disabled_legacy_check flag
162 # @bus-name: VirtIODevice bus_name
164 # @use-guest-notifier-mask: VirtIODevice use_guest_notifier_mask flag
166 # @vhost-dev: Corresponding vhost device info for a given VirtIODevice.
167 # Present if the given VirtIODevice has an active vhost
174 { 'struct': 'VirtioStatus',
175 'data': { 'name': 'str',
176 'device-id': 'uint16',
177 'vhost-started': 'bool',
178 'device-endian': 'str',
179 'guest-features': 'VirtioDeviceFeatures',
180 'host-features': 'VirtioDeviceFeatures',
181 'backend-features': 'VirtioDeviceFeatures',
183 'status': 'VirtioDeviceStatus',
185 'queue-sel': 'uint16',
186 'vm-running': 'bool',
189 'use-started': 'bool',
191 'start-on-kick': 'bool',
192 'disable-legacy-check': 'bool',
194 'use-guest-notifier-mask': 'bool',
195 '*vhost-dev': 'VhostStatus' } }
198 # @x-query-virtio-status:
200 # Poll for a comprehensive status of a given virtio device
202 # @path: Canonical QOM path of the VirtIODevice
205 # @unstable: This command is meant for debugging.
207 # Returns: VirtioStatus of the virtio device
213 # 1. Poll for the status of virtio-crypto (no vhost-crypto active)
215 # -> { "execute": "x-query-virtio-status",
216 # "arguments": { "path": "/machine/peripheral/crypto0/virtio-backend" }
219 # "device-endian": "little",
221 # "disable-legacy-check": false,
222 # "name": "virtio-crypto",
225 # "backend-features": {
229 # "start-on-kick": false,
234 # "VIRTIO_CONFIG_S_ACKNOWLEDGE: Valid virtio device found",
235 # "VIRTIO_CONFIG_S_DRIVER: Guest OS compatible with device",
236 # "VIRTIO_CONFIG_S_FEATURES_OK: Feature negotiation complete",
237 # "VIRTIO_CONFIG_S_DRIVER_OK: Driver setup and ready"
241 # "guest-features": {
242 # "dev-features": [],
244 # "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields enabled",
245 # "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supported",
246 # "VIRTIO_F_VERSION_1: Device compliant for v1 spec (legacy)"
250 # "unknown-dev-features": 1073741824,
251 # "dev-features": [],
253 # "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields enabled",
254 # "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supported",
255 # "VIRTIO_F_VERSION_1: Device compliant for v1 spec (legacy)",
256 # "VIRTIO_F_ANY_LAYOUT: Device accepts arbitrary desc. layouts",
257 # "VIRTIO_F_NOTIFY_ON_EMPTY: Notify when device runs out of avail. descs. on VQ"
260 # "use-guest-notifier-mask": true,
261 # "vm-running": true,
264 # "vhost-started": false,
265 # "use-started": true
269 # 2. Poll for the status of virtio-net (vhost-net is active)
271 # -> { "execute": "x-query-virtio-status",
272 # "arguments": { "path": "/machine/peripheral-anon/device[1]/virtio-backend" }
275 # "device-endian": "little",
277 # "disabled-legacy-check": false,
278 # "name": "virtio-net",
282 # "n-tmp-sections": 4,
283 # "n-mem-sections": 4,
287 # "backend-features": {
288 # "dev-features": [],
292 # "protocol-features": {
296 # "log-enabled": false,
297 # "acked-features": {
299 # "VIRTIO_NET_F_MRG_RXBUF: Driver can merge receive buffers"
302 # "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields enabled",
303 # "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supported",
304 # "VIRTIO_F_VERSION_1: Device compliant for v1 spec (legacy)"
309 # "VHOST_F_LOG_ALL: Logging write descriptors supported",
310 # "VIRTIO_NET_F_MRG_RXBUF: Driver can merge receive buffers"
313 # "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields enabled",
314 # "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supported",
315 # "VIRTIO_F_IOMMU_PLATFORM: Device can be used on IOMMU platform",
316 # "VIRTIO_F_VERSION_1: Device compliant for v1 spec (legacy)",
317 # "VIRTIO_F_ANY_LAYOUT: Device accepts arbitrary desc. layouts",
318 # "VIRTIO_F_NOTIFY_ON_EMPTY: Notify when device runs out of avail. descs. on VQ"
322 # "backend-features": {
324 # "VHOST_USER_F_PROTOCOL_FEATURES: Vhost-user protocol features negotiation supported",
325 # "VIRTIO_NET_F_GSO: Handling GSO-type packets supported",
326 # "VIRTIO_NET_F_CTRL_MAC_ADDR: MAC address set through control channel",
327 # "VIRTIO_NET_F_GUEST_ANNOUNCE: Driver sending gratuitous packets supported",
328 # "VIRTIO_NET_F_CTRL_RX_EXTRA: Extra RX mode control supported",
329 # "VIRTIO_NET_F_CTRL_VLAN: Control channel VLAN filtering supported",
330 # "VIRTIO_NET_F_CTRL_RX: Control channel RX mode supported",
331 # "VIRTIO_NET_F_CTRL_VQ: Control channel available",
332 # "VIRTIO_NET_F_STATUS: Configuration status field available",
333 # "VIRTIO_NET_F_MRG_RXBUF: Driver can merge receive buffers",
334 # "VIRTIO_NET_F_HOST_UFO: Device can receive UFO",
335 # "VIRTIO_NET_F_HOST_ECN: Device can receive TSO with ECN",
336 # "VIRTIO_NET_F_HOST_TSO6: Device can receive TSOv6",
337 # "VIRTIO_NET_F_HOST_TSO4: Device can receive TSOv4",
338 # "VIRTIO_NET_F_GUEST_UFO: Driver can receive UFO",
339 # "VIRTIO_NET_F_GUEST_ECN: Driver can receive TSO with ECN",
340 # "VIRTIO_NET_F_GUEST_TSO6: Driver can receive TSOv6",
341 # "VIRTIO_NET_F_GUEST_TSO4: Driver can receive TSOv4",
342 # "VIRTIO_NET_F_MAC: Device has given MAC address",
343 # "VIRTIO_NET_F_CTRL_GUEST_OFFLOADS: Control channel offloading reconfig. supported",
344 # "VIRTIO_NET_F_GUEST_CSUM: Driver handling packets with partial checksum supported",
345 # "VIRTIO_NET_F_CSUM: Device handling packets with partial checksum supported"
348 # "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields enabled",
349 # "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supported",
350 # "VIRTIO_F_VERSION_1: Device compliant for v1 spec (legacy)",
351 # "VIRTIO_F_ANY_LAYOUT: Device accepts arbitrary desc. layouts",
352 # "VIRTIO_F_NOTIFY_ON_EMPTY: Notify when device runs out of avail. descs. on VQ"
355 # "start-on-kick": false,
360 # "VIRTIO_CONFIG_S_ACKNOWLEDGE: Valid virtio device found",
361 # "VIRTIO_CONFIG_S_DRIVER: Guest OS compatible with device",
362 # "VIRTIO_CONFIG_S_FEATURES_OK: Feature negotiation complete",
363 # "VIRTIO_CONFIG_S_DRIVER_OK: Driver setup and ready"
367 # "guest-features": {
369 # "VIRTIO_NET_F_CTRL_MAC_ADDR: MAC address set through control channel",
370 # "VIRTIO_NET_F_GUEST_ANNOUNCE: Driver sending gratuitous packets supported",
371 # "VIRTIO_NET_F_CTRL_VLAN: Control channel VLAN filtering supported",
372 # "VIRTIO_NET_F_CTRL_RX: Control channel RX mode supported",
373 # "VIRTIO_NET_F_CTRL_VQ: Control channel available",
374 # "VIRTIO_NET_F_STATUS: Configuration status field available",
375 # "VIRTIO_NET_F_MRG_RXBUF: Driver can merge receive buffers",
376 # "VIRTIO_NET_F_HOST_UFO: Device can receive UFO",
377 # "VIRTIO_NET_F_HOST_ECN: Device can receive TSO with ECN",
378 # "VIRTIO_NET_F_HOST_TSO6: Device can receive TSOv6",
379 # "VIRTIO_NET_F_HOST_TSO4: Device can receive TSOv4",
380 # "VIRTIO_NET_F_GUEST_UFO: Driver can receive UFO",
381 # "VIRTIO_NET_F_GUEST_ECN: Driver can receive TSO with ECN",
382 # "VIRTIO_NET_F_GUEST_TSO6: Driver can receive TSOv6",
383 # "VIRTIO_NET_F_GUEST_TSO4: Driver can receive TSOv4",
384 # "VIRTIO_NET_F_MAC: Device has given MAC address",
385 # "VIRTIO_NET_F_CTRL_GUEST_OFFLOADS: Control channel offloading reconfig. supported",
386 # "VIRTIO_NET_F_GUEST_CSUM: Driver handling packets with partial checksum supported",
387 # "VIRTIO_NET_F_CSUM: Device handling packets with partial checksum supported"
390 # "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields enabled",
391 # "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supported",
392 # "VIRTIO_F_VERSION_1: Device compliant for v1 spec (legacy)"
397 # "VHOST_USER_F_PROTOCOL_FEATURES: Vhost-user protocol features negotiation supported",
398 # "VIRTIO_NET_F_GSO: Handling GSO-type packets supported",
399 # "VIRTIO_NET_F_CTRL_MAC_ADDR: MAC address set through control channel",
400 # "VIRTIO_NET_F_GUEST_ANNOUNCE: Driver sending gratuitous packets supported",
401 # "VIRTIO_NET_F_CTRL_RX_EXTRA: Extra RX mode control supported",
402 # "VIRTIO_NET_F_CTRL_VLAN: Control channel VLAN filtering supported",
403 # "VIRTIO_NET_F_CTRL_RX: Control channel RX mode supported",
404 # "VIRTIO_NET_F_CTRL_VQ: Control channel available",
405 # "VIRTIO_NET_F_STATUS: Configuration status field available",
406 # "VIRTIO_NET_F_MRG_RXBUF: Driver can merge receive buffers",
407 # "VIRTIO_NET_F_HOST_UFO: Device can receive UFO",
408 # "VIRTIO_NET_F_HOST_ECN: Device can receive TSO with ECN",
409 # "VIRTIO_NET_F_HOST_TSO6: Device can receive TSOv6",
410 # "VIRTIO_NET_F_HOST_TSO4: Device can receive TSOv4",
411 # "VIRTIO_NET_F_GUEST_UFO: Driver can receive UFO",
412 # "VIRTIO_NET_F_GUEST_ECN: Driver can receive TSO with ECN",
413 # "VIRTIO_NET_F_GUEST_TSO6: Driver can receive TSOv6",
414 # "VIRTIO_NET_F_GUEST_TSO4: Driver can receive TSOv4",
415 # "VIRTIO_NET_F_MAC: Device has given MAC address",
416 # "VIRTIO_NET_F_CTRL_GUEST_OFFLOADS: Control channel offloading reconfig. supported",
417 # "VIRTIO_NET_F_GUEST_CSUM: Driver handling packets with partial checksum supported",
418 # "VIRTIO_NET_F_CSUM: Device handling packets with partial checksum supported"
421 # "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields enabled",
422 # "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supported",
423 # "VIRTIO_F_VERSION_1: Device compliant for v1 spec (legacy)",
424 # "VIRTIO_F_ANY_LAYOUT: Device accepts arbitrary desc. layouts",
425 # "VIRTIO_F_NOTIFY_ON_EMPTY: Notify when device runs out of avail. descs. on VQ"
428 # "use-guest-notifier-mask": true,
429 # "vm-running": true,
432 # "vhost-started": true,
433 # "use-started": true
439 { 'command': 'x-query-virtio-status',
440 'data': { 'path': 'str' },
441 'returns': 'VirtioStatus',
442 'features': [ 'unstable' ] }
445 # @VirtioDeviceStatus:
447 # A structure defined to list the configuration statuses of a virtio
450 # @statuses: List of decoded configuration statuses of the virtio
453 # @unknown-statuses: Virtio device statuses bitmap that have not been decoded
458 { 'struct': 'VirtioDeviceStatus',
459 'data': { 'statuses': [ 'str' ],
460 '*unknown-statuses': 'uint8' } }
463 # @VhostDeviceProtocols:
465 # A structure defined to list the vhost user protocol features of a
468 # @protocols: List of decoded vhost user protocol features of a vhost
471 # @unknown-protocols: Vhost user device protocol features bitmap that
472 # have not been decoded
477 { 'struct': 'VhostDeviceProtocols',
478 'data': { 'protocols': [ 'str' ],
479 '*unknown-protocols': 'uint64' } }
482 # @VirtioDeviceFeatures:
484 # The common fields that apply to most Virtio devices. Some devices
485 # may not have their own device-specific features (e.g. virtio-rng).
487 # @transports: List of transport features of the virtio device
489 # @dev-features: List of device-specific features (if the device has
492 # @unknown-dev-features: Virtio device features bitmap that have not
498 { 'struct': 'VirtioDeviceFeatures',
499 'data': { 'transports': [ 'str' ],
500 '*dev-features': [ 'str' ],
501 '*unknown-dev-features': 'uint64' } }
506 # Information of a VirtIODevice VirtQueue, including most members of
507 # the VirtQueue data structure.
509 # @name: Name of the VirtIODevice that uses this VirtQueue
511 # @queue-index: VirtQueue queue_index
513 # @inuse: VirtQueue inuse
515 # @vring-num: VirtQueue vring.num
517 # @vring-num-default: VirtQueue vring.num_default
519 # @vring-align: VirtQueue vring.align
521 # @vring-desc: VirtQueue vring.desc (descriptor area)
523 # @vring-avail: VirtQueue vring.avail (driver area)
525 # @vring-used: VirtQueue vring.used (device area)
527 # @last-avail-idx: VirtQueue last_avail_idx or return of vhost_dev
528 # vhost_get_vring_base (if vhost active)
530 # @shadow-avail-idx: VirtQueue shadow_avail_idx
532 # @used-idx: VirtQueue used_idx
534 # @signalled-used: VirtQueue signalled_used
536 # @signalled-used-valid: VirtQueue signalled_used_valid flag
542 { 'struct': 'VirtQueueStatus',
543 'data': { 'name': 'str',
544 'queue-index': 'uint16',
546 'vring-num': 'uint32',
547 'vring-num-default': 'uint32',
548 'vring-align': 'uint32',
549 'vring-desc': 'uint64',
550 'vring-avail': 'uint64',
551 'vring-used': 'uint64',
552 '*last-avail-idx': 'uint16',
553 '*shadow-avail-idx': 'uint16',
554 'used-idx': 'uint16',
555 'signalled-used': 'uint16',
556 'signalled-used-valid': 'bool' } }
559 # @x-query-virtio-queue-status:
561 # Return the status of a given VirtIODevice's VirtQueue
563 # @path: VirtIODevice canonical QOM path
565 # @queue: VirtQueue index to examine
568 # @unstable: This command is meant for debugging.
570 # Returns: VirtQueueStatus of the VirtQueue
572 # Notes: last_avail_idx will not be displayed in the case where
573 # the selected VirtIODevice has a running vhost device and
574 # the VirtIODevice VirtQueue index (queue) does not exist for
575 # the corresponding vhost device vhost_virtqueue. Also,
576 # shadow_avail_idx will not be displayed in the case where
577 # the selected VirtIODevice has a running vhost device.
583 # 1. Get VirtQueueStatus for virtio-vsock (vhost-vsock running)
585 # -> { "execute": "x-query-virtio-queue-status",
586 # "arguments": { "path": "/machine/peripheral/vsock0/virtio-backend",
590 # "signalled-used": 0,
592 # "name": "vhost-vsock",
593 # "vring-align": 4096,
594 # "vring-desc": 5217370112,
595 # "signalled-used-valid": false,
596 # "vring-num-default": 128,
597 # "vring-avail": 5217372160,
599 # "last-avail-idx": 0,
600 # "vring-used": 5217372480,
606 # 2. Get VirtQueueStatus for virtio-serial (no vhost)
608 # -> { "execute": "x-query-virtio-queue-status",
609 # "arguments": { "path": "/machine/peripheral-anon/device[0]/virtio-backend",
613 # "signalled-used": 0,
615 # "name": "virtio-serial",
616 # "vring-align": 4096,
617 # "vring-desc": 5182074880,
618 # "signalled-used-valid": false,
619 # "vring-num-default": 128,
620 # "vring-avail": 5182076928,
622 # "last-avail-idx": 0,
623 # "vring-used": 5182077248,
625 # "shadow-avail-idx": 0,
632 { 'command': 'x-query-virtio-queue-status',
633 'data': { 'path': 'str', 'queue': 'uint16' },
634 'returns': 'VirtQueueStatus',
635 'features': [ 'unstable' ] }
638 # @VirtVhostQueueStatus:
640 # Information of a vhost device's vhost_virtqueue, including most
641 # members of the vhost_dev vhost_virtqueue data structure.
643 # @name: Name of the VirtIODevice that uses this vhost_virtqueue
645 # @kick: vhost_virtqueue kick
647 # @call: vhost_virtqueue call
649 # @desc: vhost_virtqueue desc
651 # @avail: vhost_virtqueue avail
653 # @used: vhost_virtqueue used
655 # @num: vhost_virtqueue num
657 # @desc-phys: vhost_virtqueue desc_phys (descriptor area phys. addr.)
659 # @desc-size: vhost_virtqueue desc_size
661 # @avail-phys: vhost_virtqueue avail_phys (driver area phys. addr.)
663 # @avail-size: vhost_virtqueue avail_size
665 # @used-phys: vhost_virtqueue used_phys (device area phys. addr.)
667 # @used-size: vhost_virtqueue used_size
673 { 'struct': 'VirtVhostQueueStatus',
674 'data': { 'name': 'str',
681 'desc-phys': 'uint64',
682 'desc-size': 'uint32',
683 'avail-phys': 'uint64',
684 'avail-size': 'uint32',
685 'used-phys': 'uint64',
686 'used-size': 'uint32' } }
689 # @x-query-virtio-vhost-queue-status:
691 # Return information of a given vhost device's vhost_virtqueue
693 # @path: VirtIODevice canonical QOM path
695 # @queue: vhost_virtqueue index to examine
698 # @unstable: This command is meant for debugging.
700 # Returns: VirtVhostQueueStatus of the vhost_virtqueue
706 # 1. Get vhost_virtqueue status for vhost-crypto
708 # -> { "execute": "x-query-virtio-vhost-queue-status",
709 # "arguments": { "path": "/machine/peripheral/crypto0/virtio-backend",
713 # "avail-phys": 5216124928,
714 # "name": "virtio-crypto",
715 # "used-phys": 5216127040,
716 # "avail-size": 2054,
717 # "desc-size": 16384,
719 # "desc": 140141447430144,
722 # "avail": 140141447446528,
723 # "desc-phys": 5216108544,
724 # "used": 140141447448640,
729 # 2. Get vhost_virtqueue status for vhost-vsock
731 # -> { "execute": "x-query-virtio-vhost-queue-status",
732 # "arguments": { "path": "/machine/peripheral/vsock0/virtio-backend",
736 # "avail-phys": 5182261248,
737 # "name": "vhost-vsock",
738 # "used-phys": 5182261568,
742 # "desc": 140141413580800,
745 # "avail": 140141413582848,
746 # "desc-phys": 5182259200,
747 # "used": 140141413583168,
754 { 'command': 'x-query-virtio-vhost-queue-status',
755 'data': { 'path': 'str', 'queue': 'uint16' },
756 'returns': 'VirtVhostQueueStatus',
757 'features': [ 'unstable' ] }
762 # Information regarding the vring descriptor area
764 # @addr: Guest physical address of the descriptor area
766 # @len: Length of the descriptor area
768 # @flags: List of descriptor flags
774 { 'struct': 'VirtioRingDesc',
775 'data': { 'addr': 'uint64',
777 'flags': [ 'str' ] } }
782 # Information regarding the avail vring (a.k.a. driver area)
784 # @flags: VRingAvail flags
786 # @idx: VRingAvail index
788 # @ring: VRingAvail ring[] entry at provided index
794 { 'struct': 'VirtioRingAvail',
795 'data': { 'flags': 'uint16',
802 # Information regarding the used vring (a.k.a. device area)
804 # @flags: VRingUsed flags
806 # @idx: VRingUsed index
812 { 'struct': 'VirtioRingUsed',
813 'data': { 'flags': 'uint16',
817 # @VirtioQueueElement:
819 # Information regarding a VirtQueue's VirtQueueElement including
820 # descriptor, driver, and device areas
822 # @name: Name of the VirtIODevice that uses this VirtQueue
824 # @index: Index of the element in the queue
826 # @descs: List of descriptors (VirtioRingDesc)
828 # @avail: VRingAvail info
830 # @used: VRingUsed info
836 { 'struct': 'VirtioQueueElement',
837 'data': { 'name': 'str',
839 'descs': [ 'VirtioRingDesc' ],
840 'avail': 'VirtioRingAvail',
841 'used': 'VirtioRingUsed' } }
844 # @x-query-virtio-queue-element:
846 # Return the information about a VirtQueue's VirtQueueElement
848 # @path: VirtIODevice canonical QOM path
850 # @queue: VirtQueue index to examine
852 # @index: Index of the element in the queue
853 # (default: head of the queue)
856 # @unstable: This command is meant for debugging.
858 # Returns: VirtioQueueElement information
864 # 1. Introspect on virtio-net's VirtQueue 0 at index 5
866 # -> { "execute": "x-query-virtio-queue-element",
867 # "arguments": { "path": "/machine/peripheral-anon/device[1]/virtio-backend",
873 # "name": "virtio-net",
876 # "flags": ["write"],
893 # 2. Introspect on virtio-crypto's VirtQueue 1 at head
895 # -> { "execute": "x-query-virtio-queue-element",
896 # "arguments": { "path": "/machine/peripheral/crypto0/virtio-backend",
901 # "name": "virtio-crypto",
906 # "addr": 8080268923184214134
921 # 3. Introspect on virtio-scsi's VirtQueue 2 at head
923 # -> { "execute": "x-query-virtio-queue-element",
924 # "arguments": { "path": "/machine/peripheral-anon/device[2]/virtio-backend",
929 # "name": "virtio-scsi",
932 # "flags": ["used", "indirect", "write"],
934 # "addr": 12055409292258155293
951 { 'command': 'x-query-virtio-queue-element',
952 'data': { 'path': 'str', 'queue': 'uint16', '*index': 'uint16' },
953 'returns': 'VirtioQueueElement',
954 'features': [ 'unstable' ] }