1 QAPI interface for S390 CPU topology
2 ====================================
4 The following sections will explain the QAPI interface for S390 CPU topology
5 with the help of exemplary output.
6 For this, let's assume that QEMU has been started with the following
7 command, defining 4 CPUs, where CPU[0] is defined by the -smp argument and will
15 -smp 1,drawers=3,books=3,sockets=2,cores=2,maxcpus=36 \
16 -device z14-s390x-cpu,core-id=19,entitlement=high \
17 -device z14-s390x-cpu,core-id=11,entitlement=low \
18 -device z14-s390x-cpu,core-id=12,entitlement=high \
21 Additions to query-cpus-fast
22 ----------------------------
24 The command query-cpus-fast allows querying the topology tree and
25 modifiers for all configured vCPUs.
29 { "execute": "query-cpus-fast" }
41 "cpu-state": "operating",
42 "entitlement": "medium",
43 "qom-path": "/machine/unattached/device[0]",
56 "cpu-state": "operating",
57 "entitlement": "high",
58 "qom-path": "/machine/peripheral-anon/device[0]",
71 "cpu-state": "operating",
73 "qom-path": "/machine/peripheral-anon/device[1]",
86 "cpu-state": "operating",
87 "entitlement": "high",
88 "qom-path": "/machine/peripheral-anon/device[2]",
96 QAPI command: set-cpu-topology
97 ------------------------------
99 The command set-cpu-topology allows modifying the topology tree
100 or the topology modifiers of a vCPU in the configuration.
104 { "execute": "set-cpu-topology",
110 "entitlement": "low",
116 The core-id parameter is the only mandatory parameter and every
117 unspecified parameter keeps its previous value.
119 QAPI event CPU_POLARIZATION_CHANGE
120 ----------------------------------
122 When a guest requests a modification of the polarization,
123 QEMU sends a CPU_POLARIZATION_CHANGE event.
125 When requesting the change, the guest only specifies horizontal or
126 vertical polarization.
127 It is the job of the entity administrating QEMU to set the dedication and fine
128 grained vertical entitlement in response to this event.
130 Note that a vertical polarized dedicated vCPU can only have a high
131 entitlement, giving 6 possibilities for vCPU polarization:
134 - Horizontal dedicated
138 - Vertical high dedicated
140 Example of the event received when the guest issues the CPU instruction
141 Perform Topology Function PTF(0) to request an horizontal polarization:
147 "seconds": 1687870305,
148 "microseconds": 566299
150 "event": "CPU_POLARIZATION_CHANGE",
152 "polarization": "horizontal"
156 QAPI query command: query-s390x-cpu-polarization
157 ------------------------------------------------
159 The query command query-s390x-cpu-polarization returns the current
160 CPU polarization of the machine.
161 In this case the guest previously issued a PTF(1) to request vertical polarization:
165 { "execute": "query-s390x-cpu-polarization" }
168 "polarization": "vertical"