[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v15 09/11] machine: adding s390 topology to query-cpu-fast
From: |
Pierre Morel |
Subject: |
[PATCH v15 09/11] machine: adding s390 topology to query-cpu-fast |
Date: |
Wed, 1 Feb 2023 14:20:49 +0100 |
S390x provides two more topology containers above the sockets,
books and drawers.
Let's add these CPU attributes to the QAPI command query-cpu-fast.
Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
---
qapi/machine.json | 13 ++++++++++---
hw/core/machine-qmp-cmds.c | 2 ++
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/qapi/machine.json b/qapi/machine.json
index 3036117059..e36c39e258 100644
--- a/qapi/machine.json
+++ b/qapi/machine.json
@@ -53,11 +53,18 @@
#
# Additional information about a virtual S390 CPU
#
-# @cpu-state: the virtual CPU's state
+# @cpu-state: the virtual CPU's state (since 2.12)
+# @dedicated: the virtual CPU's dedication (since 8.0)
+# @polarity: the virtual CPU's polarity (since 8.0)
#
# Since: 2.12
##
-{ 'struct': 'CpuInfoS390', 'data': { 'cpu-state': 'CpuS390State' } }
+{ 'struct': 'CpuInfoS390',
+ 'data': { 'cpu-state': 'CpuS390State',
+ 'dedicated': 'bool',
+ 'polarity': 'int'
+ }
+}
##
# @CpuInfoFast:
@@ -70,7 +77,7 @@
#
# @thread-id: ID of the underlying host thread
#
-# @props: properties describing to which node/socket/core/thread
+# @props: properties describing to which node/drawer/book/socket/core/thread
# virtual CPU belongs to, provided if supported by board
#
# @target: the QEMU system emulation target, which determines which
diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c
index 80d5e59651..e6d93cf2a0 100644
--- a/hw/core/machine-qmp-cmds.c
+++ b/hw/core/machine-qmp-cmds.c
@@ -30,6 +30,8 @@ static void cpustate_to_cpuinfo_s390(CpuInfoS390 *info, const
CPUState *cpu)
CPUS390XState *env = &s390_cpu->env;
info->cpu_state = env->cpu_state;
+ info->dedicated = env->dedicated;
+ info->polarity = env->entitlement;
#else
abort();
#endif
--
2.31.1
- Re: [PATCH v15 10/11] qapi/s390x/cpu topology: CPU_POLARITY_CHANGE qapi event, (continued)
[PATCH v15 11/11] docs/s390x/cpu topology: document s390x cpu topology, Pierre Morel, 2023/02/01
[PATCH v15 09/11] machine: adding s390 topology to query-cpu-fast,
Pierre Morel <=
Re: [PATCH v15 09/11] machine: adding s390 topology to query-cpu-fast, Pierre Morel, 2023/02/06
Re: [PATCH v15 09/11] machine: adding s390 topology to query-cpu-fast, Nina Schoetterl-Glausch, 2023/02/07
[PATCH v15 03/11] target/s390x/cpu topology: handle STSI(15) and build the SYSIB, Pierre Morel, 2023/02/01