aboutsummaryrefslogtreecommitdiff
path: root/target/s390x/misc_helper.c
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2018-01-29 13:56:17 +0100
committerCornelia Huck <cohuck@redhat.com>2018-02-09 09:37:13 +0100
commit4d1369efaad3b5297f164d787bda3dd24723c1e2 (patch)
tree4488c4bea1641d3074683fa5a58bf3711fee9bf3 /target/s390x/misc_helper.c
parent631b59664c9d8472d64c9c9c14b709dd40f07b16 (diff)
s390x: fix size + content of STSI blocks
All blocks are 4k in size, which is only true for two of them right now. Also some reserved fields were wrong, fix it and convert all reserved fields to u8. This also fixes the LPAR part output in /proc/sysinfo under TCG. (for now, everything was indicated as 0) While at it, introduce typedefs for these structs and use them in TCG/KVM code. Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20180129125623.21729-13-david@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'target/s390x/misc_helper.c')
-rw-r--r--target/s390x/misc_helper.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/target/s390x/misc_helper.c b/target/s390x/misc_helper.c
index 6ee7e8a64a..466231de0b 100644
--- a/target/s390x/misc_helper.c
+++ b/target/s390x/misc_helper.c
@@ -217,7 +217,7 @@ uint32_t HELPER(stsi)(CPUS390XState *env, uint64_t a0,
case STSI_LEVEL_1:
if ((sel1 == 1) && (sel2 == 1)) {
/* Basic Machine Configuration */
- struct sysib_111 sysib;
+ SysIB_111 sysib;
char type[5] = {};
memset(&sysib, 0, sizeof(sysib));
@@ -232,7 +232,7 @@ uint32_t HELPER(stsi)(CPUS390XState *env, uint64_t a0,
cpu_physical_memory_write(a0, &sysib, sizeof(sysib));
} else if ((sel1 == 2) && (sel2 == 1)) {
/* Basic Machine CPU */
- struct sysib_121 sysib;
+ SysIB_121 sysib;
memset(&sysib, 0, sizeof(sysib));
/* XXX make different for different CPUs? */
@@ -242,7 +242,7 @@ uint32_t HELPER(stsi)(CPUS390XState *env, uint64_t a0,
cpu_physical_memory_write(a0, &sysib, sizeof(sysib));
} else if ((sel1 == 2) && (sel2 == 2)) {
/* Basic Machine CPUs */
- struct sysib_122 sysib;
+ SysIB_122 sysib;
memset(&sysib, 0, sizeof(sysib));
stl_p(&sysib.capability, 0x443afc29);
@@ -260,7 +260,7 @@ uint32_t HELPER(stsi)(CPUS390XState *env, uint64_t a0,
{
if ((sel1 == 2) && (sel2 == 1)) {
/* LPAR CPU */
- struct sysib_221 sysib;
+ SysIB_221 sysib;
memset(&sysib, 0, sizeof(sysib));
/* XXX make different for different CPUs? */
@@ -271,7 +271,7 @@ uint32_t HELPER(stsi)(CPUS390XState *env, uint64_t a0,
cpu_physical_memory_write(a0, &sysib, sizeof(sysib));
} else if ((sel1 == 2) && (sel2 == 2)) {
/* LPAR CPUs */
- struct sysib_222 sysib;
+ SysIB_222 sysib;
memset(&sysib, 0, sizeof(sysib));
stw_p(&sysib.lpar_num, 0);
@@ -295,7 +295,7 @@ uint32_t HELPER(stsi)(CPUS390XState *env, uint64_t a0,
{
if ((sel1 == 2) && (sel2 == 2)) {
/* VM CPUs */
- struct sysib_322 sysib;
+ SysIB_322 sysib;
memset(&sysib, 0, sizeof(sysib));
sysib.count = 1;