[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v23 12/20] qapi/s390x/cpu topology: query-cpu-polarization qmp co
From: |
Nina Schoetterl-Glausch |
Subject: |
[PATCH v23 12/20] qapi/s390x/cpu topology: query-cpu-polarization qmp command |
Date: |
Thu, 14 Sep 2023 14:06:42 +0200 |
From: Pierre Morel <pmorel@linux.ibm.com>
The query-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 | 29 +++++++++++++++++++++++++++++
hw/s390x/cpu-topology.c | 8 ++++++++
2 files changed, 37 insertions(+)
diff --git a/qapi/machine-target.json b/qapi/machine-target.json
index 276c3bf9d1..58ba28a868 100644
--- a/qapi/machine-target.json
+++ b/qapi/machine-target.json
@@ -445,3 +445,32 @@
'features': [ 'unstable' ],
'if': { 'all': [ 'TARGET_S390X', 'CONFIG_KVM' ] }
}
+
+##
+# @CpuPolarizationInfo:
+#
+# The result of a cpu polarization
+#
+# @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 may still be modified.
+#
+# Returns: the machine 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 v23 00/20] s390x: CPU Topology, Nina Schoetterl-Glausch, 2023/09/14
- [PATCH v23 07/20] target/s390x/cpu topology: activate CPU topology, Nina Schoetterl-Glausch, 2023/09/14
- [PATCH v23 16/20] tests/avocado: s390x cpu topology entitlement tests, Nina Schoetterl-Glausch, 2023/09/14
- [PATCH v23 19/20] tests/avocado: s390x cpu topology dedicated errors, Nina Schoetterl-Glausch, 2023/09/14
- [PATCH v23 03/20] target/s390x/cpu topology: handle STSI(15) and build the SYSIB, Nina Schoetterl-Glausch, 2023/09/14
- [PATCH v23 12/20] qapi/s390x/cpu topology: query-cpu-polarization qmp command,
Nina Schoetterl-Glausch <=
- [PATCH v23 18/20] tests/avocado: s390x cpu topology test socket full, Nina Schoetterl-Glausch, 2023/09/14
- [PATCH v23 06/20] s390x/cpu topology: interception of PTF instruction, Nina Schoetterl-Glausch, 2023/09/14
- [PATCH v23 09/20] machine: adding s390 topology to query-cpu-fast, Nina Schoetterl-Glausch, 2023/09/14
- [PATCH v23 05/20] s390x/cpu topology: resetting the Topology-Change-Report, Nina Schoetterl-Glausch, 2023/09/14
- [PATCH v23 14/20] tests/avocado: s390x cpu topology core, Nina Schoetterl-Glausch, 2023/09/14
- [PATCH v23 17/20] tests/avocado: s390x cpu topology test dedicated CPU, Nina Schoetterl-Glausch, 2023/09/14
- [PATCH v23 15/20] tests/avocado: s390x cpu topology polarization, Nina Schoetterl-Glausch, 2023/09/14
- [PATCH v23 01/20] CPU topology: extend with s390 specifics, Nina Schoetterl-Glausch, 2023/09/14