xref: /qemu/qapi/machine-s390x.json (revision f8d41d0511114edcde8c589ffc76887b3a2dc39b)
17f7b4e7aSMarkus Armbruster# -*- Mode: Python -*-
2f7160f32SAndrea Bolognani# vim: filetype=python
37f7b4e7aSMarkus Armbruster#
4*f8d41d05SDaniel P. Berrangé# SPDX-License-Identifier: GPL-2.0-or-later
57f7b4e7aSMarkus Armbruster# This work is licensed under the terms of the GNU GPL, version 2 or later.
67f7b4e7aSMarkus Armbruster# See the COPYING file in the top-level directory.
77f7b4e7aSMarkus Armbruster
8a457c2abSPierre Morel{ 'include': 'machine-common.json' }
9a457c2abSPierre Morel
107f7b4e7aSMarkus Armbruster##
1132cfefb9SMarkus Armbruster# @S390CpuPolarization:
12f4f54b58SPierre Morel#
13f4f54b58SPierre Morel# An enumeration of CPU polarization that can be assumed by a virtual
14f4f54b58SPierre Morel# S390 CPU
15f4f54b58SPierre Morel#
16f4f54b58SPierre Morel# Since: 8.2
17f4f54b58SPierre Morel##
1832cfefb9SMarkus Armbruster{ 'enum': 'S390CpuPolarization',
19*f8d41d05SDaniel P. Berrangé  'data': [ 'horizontal', 'vertical' ]
20f4f54b58SPierre Morel}
21a457c2abSPierre Morel
22a457c2abSPierre Morel##
23a457c2abSPierre Morel# @set-cpu-topology:
24a457c2abSPierre Morel#
25209e64d9SMarkus Armbruster# Modify the topology by moving the CPU inside the topology tree, or
26209e64d9SMarkus Armbruster# by changing a modifier attribute of a CPU.  Absent values will not
27209e64d9SMarkus Armbruster# be modified.
28a457c2abSPierre Morel#
29a457c2abSPierre Morel# @core-id: the vCPU ID to be moved
30a457c2abSPierre Morel#
31a457c2abSPierre Morel# @socket-id: destination socket to move the vCPU to
32a457c2abSPierre Morel#
33a457c2abSPierre Morel# @book-id: destination book to move the vCPU to
34a457c2abSPierre Morel#
35a457c2abSPierre Morel# @drawer-id: destination drawer to move the vCPU to
36a457c2abSPierre Morel#
37a457c2abSPierre Morel# @entitlement: entitlement to set
38a457c2abSPierre Morel#
39209e64d9SMarkus Armbruster# @dedicated: whether the provisioning of real to virtual CPU is
40209e64d9SMarkus Armbruster#     dedicated
41a457c2abSPierre Morel#
42a457c2abSPierre Morel# Features:
43a457c2abSPierre Morel#
44a457c2abSPierre Morel# @unstable: This command is experimental.
45a457c2abSPierre Morel#
46a457c2abSPierre Morel# Since: 8.2
47a457c2abSPierre Morel##
48a457c2abSPierre Morel{ 'command': 'set-cpu-topology',
49a457c2abSPierre Morel  'data': {
50a457c2abSPierre Morel      'core-id': 'uint16',
51a457c2abSPierre Morel      '*socket-id': 'uint16',
52a457c2abSPierre Morel      '*book-id': 'uint16',
53a457c2abSPierre Morel      '*drawer-id': 'uint16',
5432cfefb9SMarkus Armbruster      '*entitlement': 'S390CpuEntitlement',
55a457c2abSPierre Morel      '*dedicated': 'bool'
56a457c2abSPierre Morel  },
57*f8d41d05SDaniel P. Berrangé  'features': [ 'unstable' ]
58a457c2abSPierre Morel}
591cfe52b7SPierre Morel
601cfe52b7SPierre Morel##
611cfe52b7SPierre Morel# @CPU_POLARIZATION_CHANGE:
621cfe52b7SPierre Morel#
631cfe52b7SPierre Morel# Emitted when the guest asks to change the polarization.
641cfe52b7SPierre Morel#
651cfe52b7SPierre Morel# The guest can tell the host (via the PTF instruction) whether the
66209e64d9SMarkus Armbruster# CPUs should be provisioned using horizontal or vertical
67209e64d9SMarkus Armbruster# polarization.
681cfe52b7SPierre Morel#
69209e64d9SMarkus Armbruster# On horizontal polarization the host is expected to provision all
70209e64d9SMarkus Armbruster# vCPUs equally.
711cfe52b7SPierre Morel#
72209e64d9SMarkus Armbruster# On vertical polarization the host can provision each vCPU
73209e64d9SMarkus Armbruster# differently.  The guest will get information on the details of the
74209e64d9SMarkus Armbruster# provisioning the next time it uses the STSI(15) instruction.
751cfe52b7SPierre Morel#
761cfe52b7SPierre Morel# @polarization: polarization specified by the guest
771cfe52b7SPierre Morel#
781cfe52b7SPierre Morel# Features:
791cfe52b7SPierre Morel#
801cfe52b7SPierre Morel# @unstable: This event is experimental.
811cfe52b7SPierre Morel#
821cfe52b7SPierre Morel# Since: 8.2
831cfe52b7SPierre Morel#
8414b48aaaSJohn Snow# .. qmp-example::
851cfe52b7SPierre Morel#
861cfe52b7SPierre Morel#     <- { "event": "CPU_POLARIZATION_CHANGE",
871cfe52b7SPierre Morel#          "data": { "polarization": "horizontal" },
881cfe52b7SPierre Morel#          "timestamp": { "seconds": 1401385907, "microseconds": 422329 } }
891cfe52b7SPierre Morel##
901cfe52b7SPierre Morel{ 'event': 'CPU_POLARIZATION_CHANGE',
9132cfefb9SMarkus Armbruster  'data': { 'polarization': 'S390CpuPolarization' },
92*f8d41d05SDaniel P. Berrangé  'features': [ 'unstable' ]
931cfe52b7SPierre Morel}
94154893a7SPierre Morel
95154893a7SPierre Morel##
96154893a7SPierre Morel# @CpuPolarizationInfo:
97154893a7SPierre Morel#
98154893a7SPierre Morel# The result of a CPU polarization query.
99154893a7SPierre Morel#
100154893a7SPierre Morel# @polarization: the CPU polarization
101154893a7SPierre Morel#
102154893a7SPierre Morel# Since: 8.2
103154893a7SPierre Morel##
104154893a7SPierre Morel{ 'struct': 'CpuPolarizationInfo',
105*f8d41d05SDaniel P. Berrangé  'data': { 'polarization': 'S390CpuPolarization' }
106154893a7SPierre Morel}
107154893a7SPierre Morel
108154893a7SPierre Morel##
109154893a7SPierre Morel# @query-s390x-cpu-polarization:
110154893a7SPierre Morel#
111154893a7SPierre Morel# Features:
112154893a7SPierre Morel#
113154893a7SPierre Morel# @unstable: This command is experimental.
114154893a7SPierre Morel#
115154893a7SPierre Morel# Returns: the machine's CPU polarization
116154893a7SPierre Morel#
117154893a7SPierre Morel# Since: 8.2
118154893a7SPierre Morel##
119154893a7SPierre Morel{ 'command': 'query-s390x-cpu-polarization', 'returns': 'CpuPolarizationInfo',
120*f8d41d05SDaniel P. Berrangé  'features': [ 'unstable' ]
121154893a7SPierre Morel}
122