| 1 | # -*- Mode: Python -*- |
| 2 | # vim: filetype=python |
| 3 | # |
| 4 | # SPDX-License-Identifier: GPL-2.0-or-later |
| 5 | |
| 6 | ## |
| 7 | # ************ |
| 8 | # Accelerators |
| 9 | # ************ |
| 10 | ## |
| 11 | |
| 12 | { 'include': 'common.json' } |
| 13 | |
| 14 | ## |
| 15 | # @KvmInfo: |
| 16 | # |
| 17 | # Information about support for KVM acceleration |
| 18 | # |
| 19 | # @enabled: true if KVM acceleration is active |
| 20 | # |
| 21 | # @present: true if KVM acceleration is built into this executable |
| 22 | # |
| 23 | # Since: 0.14 |
| 24 | ## |
| 25 | { 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} } |
| 26 | |
| 27 | ## |
| 28 | # @query-kvm: |
| 29 | # |
| 30 | # Return information about KVM acceleration |
| 31 | # |
| 32 | # Features: |
| 33 | # |
| 34 | # @deprecated: This command is deprecated. Use `query-accelerators` |
| 35 | # instead. |
| 36 | # |
| 37 | # Since: 0.14 |
| 38 | # |
| 39 | # .. qmp-example:: |
| 40 | # |
| 41 | # -> { "execute": "query-kvm" } |
| 42 | # <- { "return": { "enabled": true, "present": true } } |
| 43 | ## |
| 44 | { 'command': 'query-kvm', 'returns': 'KvmInfo', |
| 45 | 'features': [ 'deprecated' ] } |
| 46 | |
| 47 | ## |
| 48 | # @x-accel-stats: |
| 49 | # |
| 50 | # Query accelerator statistics |
| 51 | # |
| 52 | # Features: |
| 53 | # |
| 54 | # @unstable: This command is meant for debugging. |
| 55 | # |
| 56 | # Returns: accelerator statistics |
| 57 | # |
| 58 | # Since: 10.1 |
| 59 | ## |
| 60 | { 'command': 'x-accel-stats', |
| 61 | 'returns': 'HumanReadableText', |
| 62 | 'features': [ 'unstable' ] } |
| 63 | |
| 64 | ## |
| 65 | # @Accelerator: |
| 66 | # |
| 67 | # Information about support for MSHV acceleration |
| 68 | # |
| 69 | # @hvf: Apple Hypervisor.framework |
| 70 | # |
| 71 | # @kvm: KVM |
| 72 | # |
| 73 | # @mshv: Hyper-V |
| 74 | # |
| 75 | # @nvmm: NetBSD NVMM |
| 76 | # |
| 77 | # @qtest: QTest (dummy accelerator) |
| 78 | # |
| 79 | # @tcg: TCG (dynamic translation) |
| 80 | # |
| 81 | # @whpx: Windows Hypervisor Platform |
| 82 | # |
| 83 | # @xen: Xen |
| 84 | # |
| 85 | # Since: 10.2.0 |
| 86 | ## |
| 87 | { 'enum': 'Accelerator', 'data': ['hvf', 'kvm', 'mshv', 'nvmm', 'qtest', 'tcg', 'whpx', 'xen'] } |
| 88 | |
| 89 | ## |
| 90 | # @AcceleratorInfo: |
| 91 | # |
| 92 | # Information about support for various accelerators |
| 93 | # |
| 94 | # @enabled: the accelerator that is in use |
| 95 | # |
| 96 | # @present: the list of accelerators that are built into this |
| 97 | # executable |
| 98 | # |
| 99 | # Since: 10.2.0 |
| 100 | ## |
| 101 | { 'struct': 'AcceleratorInfo', 'data': {'enabled': 'Accelerator', 'present': ['Accelerator']} } |
| 102 | |
| 103 | ## |
| 104 | # @query-accelerators: |
| 105 | # |
| 106 | # Return information about accelerators |
| 107 | # |
| 108 | # Returns: @AcceleratorInfo |
| 109 | # |
| 110 | # Since: 10.2.0 |
| 111 | # |
| 112 | # .. qmp-example:: |
| 113 | # |
| 114 | # -> { "execute": "query-accelerators" } |
| 115 | # <- { "return": { "enabled": "mshv", "present": ["kvm", "mshv", "qtest", "tcg"] } } |
| 116 | ## |
| 117 | { 'command': 'query-accelerators', 'returns': 'AcceleratorInfo' } |