diff options
author | Farhan Ali | 2016-03-29 16:34:37 +0200 |
---|---|---|
committer | Cornelia Huck | 2017-05-02 15:08:54 +0200 |
commit | b038411d85b19e058d3909d97738a85c3f402db3 (patch) | |
tree | c4f8111bc649f3caef121521787c8da850ae642e /hw/s390x/sclp.c | |
parent | hw/s390x/ipl: enable LOADPARM in IPIB for a boot device (diff) | |
download | qemu-b038411d85b19e058d3909d97738a85c3f402db3.tar.gz qemu-b038411d85b19e058d3909d97738a85c3f402db3.tar.xz qemu-b038411d85b19e058d3909d97738a85c3f402db3.zip |
hw/s390x/sclp: update LOADPARM in SCP Info
LOADPARM has two copies:
1. in SCP Information Block
2. in IPL Information Parameter Block
So, update SCLP intrinsics now. We always store LOADPARM in SCP
information block even if we don't have a valid IPL Information
Parameter Block.
Initial patch from Eugene (jno) Dvurechenski.
Signed-off-by: Eugene (jno) Dvurechenski <jno@linux.vnet.ibm.com>
Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'hw/s390x/sclp.c')
-rw-r--r-- | hw/s390x/sclp.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c index e741da1141..b4f6dd58dd 100644 --- a/hw/s390x/sclp.c +++ b/hw/s390x/sclp.c @@ -23,6 +23,7 @@ #include "hw/s390x/sclp.h" #include "hw/s390x/event-facility.h" #include "hw/s390x/s390-pci-bus.h" +#include "hw/s390x/ipl.h" static inline SCLPDevice *get_sclp_device(void) { @@ -57,6 +58,7 @@ static void read_SCP_info(SCLPDevice *sclp, SCCB *sccb) int cpu_count = 0; int rnsize, rnmax; int slots = MIN(machine->ram_slots, s390_get_memslot_count(kvm_state)); + IplParameterBlock *ipib = s390_ipl_get_iplb(); CPU_FOREACH(cpu) { cpu_count++; @@ -129,6 +131,13 @@ static void read_SCP_info(SCLPDevice *sclp, SCCB *sccb) read_info->rnmax2 = cpu_to_be64(rnmax); } + if (ipib && ipib->flags & DIAG308_FLAGS_LP_VALID) { + memcpy(&read_info->loadparm, &ipib->loadparm, + sizeof(read_info->loadparm)); + } else { + s390_ipl_set_loadparm(read_info->loadparm); + } + sccb->h.response_code = cpu_to_be16(SCLP_RC_NORMAL_READ_COMPLETION); } |