diff options
author | Alexander Yarygin <yarygin@linux.vnet.ibm.com> | 2015-07-13 15:04:36 +0300 |
---|---|---|
committer | Cornelia Huck <cornelia.huck@de.ibm.com> | 2016-05-17 15:50:29 +0200 |
commit | 04ca4b92ecb33703b03b8501bfb3d8b0c551e2e5 (patch) | |
tree | 0ffae5df7694133b51642c830344d3c592a63f7a /target-s390x/misc_helper.c | |
parent | 9700230b0d6d68d8650206ffd10d132219678db1 (diff) |
s390x/ipl: Extend the IplParameterBlock struct
The IplParameterBlock struct currently has only 200 bytes filled, but it
can be up to 4K.
This patch converts the struct to union with a fully populated struct
inside it and second struct with old values.
For compatibility reasons we disable migration of the extended iplb
field for pre-2.7 machines. Also a guest still can read/write only the
first 200 bytes of IPLB for now.
Signed-off-by: Alexander Yarygin <yarygin@linux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'target-s390x/misc_helper.c')
-rw-r--r-- | target-s390x/misc_helper.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/target-s390x/misc_helper.c b/target-s390x/misc_helper.c index 71cbe34e05..fab7f87a8f 100644 --- a/target-s390x/misc_helper.c +++ b/target-s390x/misc_helper.c @@ -232,8 +232,8 @@ void handle_diag_308(CPUS390XState *env, uint64_t r1, uint64_t r3) program_interrupt(env, PGM_ADDRESSING, ILEN_LATER_INC); return; } - iplb = g_malloc0(sizeof(struct IplParameterBlock)); - cpu_physical_memory_read(addr, iplb, sizeof(struct IplParameterBlock)); + iplb = g_malloc0(sizeof(IplParameterBlock)); + cpu_physical_memory_read(addr, iplb, S390_IPLB_MIN_CCW_LEN); s390_ipl_update_diag308(iplb); env->regs[r1 + 1] = DIAG_308_RC_OK; g_free(iplb); @@ -250,8 +250,7 @@ void handle_diag_308(CPUS390XState *env, uint64_t r1, uint64_t r3) } iplb = s390_ipl_get_iplb(); if (iplb) { - cpu_physical_memory_write(addr, iplb, - sizeof(struct IplParameterBlock)); + cpu_physical_memory_write(addr, iplb, S390_IPLB_MIN_CCW_LEN); env->regs[r1 + 1] = DIAG_308_RC_OK; } else { env->regs[r1 + 1] = DIAG_308_RC_NO_CONF; |