From 154893a784cb3f1349fce65ab6038e0bc462d218 Mon Sep 17 00:00:00 2001 From: Pierre Morel Date: Mon, 16 Oct 2023 20:39:17 +0200 Subject: qapi/s390x/cpu topology: add query-s390x-cpu-polarization command The query-s390x-cpu-polarization qmp command returns the current CPU polarization of the machine. Signed-off-by: Pierre Morel Reviewed-by: Thomas Huth Reviewed-by: Nina Schoetterl-Glausch Co-developed-by: Nina Schoetterl-Glausch Acked-by: Markus Armbruster Signed-off-by: Nina Schoetterl-Glausch Message-ID: <20231016183925.2384704-14-nsg@linux.ibm.com> Signed-off-by: Thomas Huth --- hw/s390x/cpu-topology.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'hw') diff --git a/hw/s390x/cpu-topology.c b/hw/s390x/cpu-topology.c index 327bcce..f16bdf6 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; +} -- cgit v1.1