[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v24 13/21] qapi/s390x/cpu topology: add query-s390x-cpu-polarizat
From: |
Nina Schoetterl-Glausch |
Subject: |
[PATCH v24 13/21] qapi/s390x/cpu topology: add query-s390x-cpu-polarization command |
Date: |
Tue, 26 Sep 2023 14:15:26 +0200 |
From: Pierre Morel <pmorel@linux.ibm.com>
The query-s390x-cpu-polarization qmp command returns the current
CPU polarization of the machine.
Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
Co-developed-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
---
qapi/machine-target.json | 30 ++++++++++++++++++++++++++++++
hw/s390x/cpu-topology.c | 8 ++++++++
2 files changed, 38 insertions(+)
diff --git a/qapi/machine-target.json b/qapi/machine-target.json
index 02f1de5d02..10289835fb 100644
--- a/qapi/machine-target.json
+++ b/qapi/machine-target.json
@@ -451,3 +451,33 @@
'features': [ 'unstable' ],
'if': { 'all': [ 'TARGET_S390X', 'CONFIG_KVM' ] }
}
+
+##
+# @CpuPolarizationInfo:
+#
+# The result of a CPU polarization query.
+#
+# @polarization: the CPU polarization
+#
+# Since: 8.2
+##
+{ 'struct': 'CpuPolarizationInfo',
+ 'data': { 'polarization': 'CpuS390Polarization' },
+ 'if': { 'all': [ 'TARGET_S390X', 'CONFIG_KVM' ] }
+}
+
+##
+# @query-s390x-cpu-polarization:
+#
+# Features:
+#
+# @unstable: This command is experimental.
+#
+# Returns: the machine's CPU polarization
+#
+# Since: 8.2
+##
+{ 'command': 'query-s390x-cpu-polarization', 'returns': 'CpuPolarizationInfo',
+ 'features': [ 'unstable' ],
+ 'if': { 'all': [ 'TARGET_S390X', 'CONFIG_KVM' ] }
+}
diff --git a/hw/s390x/cpu-topology.c b/hw/s390x/cpu-topology.c
index 18274db74c..1561a8ab44 100644
--- a/hw/s390x/cpu-topology.c
+++ b/hw/s390x/cpu-topology.c
@@ -459,3 +459,11 @@ void qmp_set_cpu_topology(uint16_t core,
has_drawer, drawer, has_entitlement, entitlement,
has_dedicated, dedicated, errp);
}
+
+CpuPolarizationInfo *qmp_query_s390x_cpu_polarization(Error **errp)
+{
+ CpuPolarizationInfo *info = g_new0(CpuPolarizationInfo, 1);
+
+ info->polarization = s390_topology.polarization;
+ return info;
+}
--
2.39.2
- [PATCH v24 14/21] docs/s390x/cpu topology: document s390x cpu topology, (continued)
- [PATCH v24 14/21] docs/s390x/cpu topology: document s390x cpu topology, Nina Schoetterl-Glausch, 2023/09/26
- [PATCH v24 02/21] CPU topology: extend with s390 specifics, Nina Schoetterl-Glausch, 2023/09/26
- [PATCH v24 15/21] tests/avocado: s390x cpu topology core, Nina Schoetterl-Glausch, 2023/09/26
- [PATCH v24 06/21] s390x/cpu topology: resetting the Topology-Change-Report, Nina Schoetterl-Glausch, 2023/09/26
- [PATCH v24 03/21] s390x/cpu topology: add topology entries on CPU hotplug, Nina Schoetterl-Glausch, 2023/09/26
- [PATCH v24 08/21] target/s390x/cpu topology: activate CPU topology, Nina Schoetterl-Glausch, 2023/09/26
- [PATCH v24 09/21] qapi/s390x/cpu topology: set-cpu-topology qmp command, Nina Schoetterl-Glausch, 2023/09/26
- [PATCH v24 13/21] qapi/s390x/cpu topology: add query-s390x-cpu-polarization command,
Nina Schoetterl-Glausch <=
- [PATCH v24 16/21] tests/avocado: s390x cpu topology polarization, Nina Schoetterl-Glausch, 2023/09/26
- [PATCH v24 01/21] qapi: machine.json: change docs regarding CpuInstanceProperties, Nina Schoetterl-Glausch, 2023/09/26
- [PATCH v24 20/21] tests/avocado: s390x cpu topology dedicated errors, Nina Schoetterl-Glausch, 2023/09/26
- [PATCH v24 21/21] tests/avocado: s390x cpu topology bad move, Nina Schoetterl-Glausch, 2023/09/26
- [PATCH v24 11/21] machine: adding s390 topology to info hotpluggable-cpus, Nina Schoetterl-Glausch, 2023/09/26
- [PATCH v24 07/21] s390x/cpu topology: interception of PTF instruction, Nina Schoetterl-Glausch, 2023/09/26
- [PATCH v24 05/21] s390x/sclp: reporting the maximum nested topology entries, Nina Schoetterl-Glausch, 2023/09/26
- [PATCH v24 12/21] qapi/s390x/cpu topology: CPU_POLARIZATION_CHANGE qapi event, Nina Schoetterl-Glausch, 2023/09/26
- [PATCH v24 17/21] tests/avocado: s390x cpu topology entitlement tests, Nina Schoetterl-Glausch, 2023/09/26