aboutsummaryrefslogtreecommitdiff
path: root/hw/s390x/sclp.c
diff options
context:
space:
mode:
authorJared Rossi <jrossi@linux.ibm.com>2024-10-19 21:29:48 -0400
committerThomas Huth <thuth@redhat.com>2024-10-23 06:53:44 +0200
commitbb185de42339025db9bbd5aa11f3f644c2a077f8 (patch)
treeb6e4acff235293cd134171499a83a7efdf7ec0d5 /hw/s390x/sclp.c
parentba3658adc80a9370257a9c4e114829ec691311e3 (diff)
downloadqemu-bb185de42339025db9bbd5aa11f3f644c2a077f8.zip
qemu-bb185de42339025db9bbd5aa11f3f644c2a077f8.tar.gz
qemu-bb185de42339025db9bbd5aa11f3f644c2a077f8.tar.bz2
s390x: Add individual loadparm assignment to CCW device
Add a loadparm property to the VirtioCcwDevice object so that different loadparms can be defined on a per-device basis for CCW boot devices. The machine/global loadparm is still supported. If both a global and per-device loadparm are defined, the per-device value will override the global value for that device, but any other devices that do not specify a per-device loadparm will still use the global loadparm. It is invalid to assign a loadparm to a non-boot device. Signed-off-by: Jared Rossi <jrossi@linux.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-ID: <20241020012953.1380075-15-jrossi@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'hw/s390x/sclp.c')
-rw-r--r--hw/s390x/sclp.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c
index e725dcd..8757626 100644
--- a/hw/s390x/sclp.c
+++ b/hw/s390x/sclp.c
@@ -110,7 +110,6 @@ static void read_SCP_info(SCLPDevice *sclp, SCCB *sccb)
MachineState *machine = MACHINE(qdev_get_machine());
int cpu_count;
int rnsize, rnmax;
- IplParameterBlock *ipib = s390_ipl_get_iplb();
int required_len = SCCB_REQ_LEN(ReadInfo, machine->possible_cpus->len);
int offset_cpu = s390_has_feat(S390_FEAT_EXTENDED_LENGTH_SCCB) ?
offsetof(ReadInfo, entries) :
@@ -171,12 +170,8 @@ 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);
- }
+ s390_ipl_convert_loadparm((char *)S390_CCW_MACHINE(machine)->loadparm,
+ read_info->loadparm);
sccb->h.response_code = cpu_to_be16(SCLP_RC_NORMAL_READ_COMPLETION);
}