aboutsummaryrefslogtreecommitdiff
path: root/include/hw/s390x/cpu-topology.h
diff options
context:
space:
mode:
authorPierre Morel <pmorel@linux.ibm.com>2023-10-16 20:39:08 +0200
committerThomas Huth <thuth@redhat.com>2023-10-20 07:16:53 +0200
commitf4f54b582f4b78f4cfd5a6912e88aef4f11e3e3c (patch)
tree45a381c8aaf203d5bba84030910e820144434566 /include/hw/s390x/cpu-topology.h
parentc809bbc8e98cf7fa254fac91084ade0a22877dec (diff)
downloadqemu-f4f54b582f4b78f4cfd5a6912e88aef4f11e3e3c.zip
qemu-f4f54b582f4b78f4cfd5a6912e88aef4f11e3e3c.tar.gz
qemu-f4f54b582f4b78f4cfd5a6912e88aef4f11e3e3c.tar.bz2
target/s390x/cpu topology: handle STSI(15) and build the SYSIB
On interception of STSI(15.1.x) the System Information Block (SYSIB) is built from the list of pre-ordered topology entries. Signed-off-by: Pierre Morel <pmorel@linux.ibm.com> Reviewed-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com> Co-developed-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Acked-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com> Message-ID: <20231016183925.2384704-5-nsg@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'include/hw/s390x/cpu-topology.h')
-rw-r--r--include/hw/s390x/cpu-topology.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/hw/s390x/cpu-topology.h b/include/hw/s390x/cpu-topology.h
index afef70a..85499fe 100644
--- a/include/hw/s390x/cpu-topology.h
+++ b/include/hw/s390x/cpu-topology.h
@@ -15,10 +15,33 @@
#include "hw/boards.h"
#include "qapi/qapi-types-machine-target.h"
+#define S390_TOPOLOGY_CPU_IFL 0x03
+
+typedef struct S390TopologyId {
+ uint8_t sentinel;
+ uint8_t drawer;
+ uint8_t book;
+ uint8_t socket;
+ uint8_t type;
+ uint8_t vertical:1;
+ uint8_t entitlement:2;
+ uint8_t dedicated;
+ uint8_t origin;
+} S390TopologyId;
+
+typedef struct S390TopologyEntry {
+ QTAILQ_ENTRY(S390TopologyEntry) next;
+ S390TopologyId id;
+ uint64_t mask;
+} S390TopologyEntry;
+
typedef struct S390Topology {
uint8_t *cores_per_socket;
+ CpuS390Polarization polarization;
} S390Topology;
+typedef QTAILQ_HEAD(, S390TopologyEntry) S390TopologyList;
+
#ifdef CONFIG_KVM
bool s390_has_topology(void);
void s390_topology_setup_cpu(MachineState *ms, S390CPU *cpu, Error **errp);