aboutsummaryrefslogtreecommitdiff
path: root/pc-bios/s390-ccw/main.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 /pc-bios/s390-ccw/main.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 'pc-bios/s390-ccw/main.c')
-rw-r--r--pc-bios/s390-ccw/main.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/pc-bios/s390-ccw/main.c b/pc-bios/s390-ccw/main.c
index 34ef27d..ab4709e 100644
--- a/pc-bios/s390-ccw/main.c
+++ b/pc-bios/s390-ccw/main.c
@@ -183,8 +183,14 @@ static void css_setup(void)
static void boot_setup(void)
{
char lpmsg[] = "LOADPARM=[________]\n";
+ have_iplb = store_iplb(&iplb);
+
+ if (memcmp(iplb.loadparm, NO_LOADPARM, LOADPARM_LEN) != 0) {
+ ebcdic_to_ascii((char *) iplb.loadparm, loadparm_str, LOADPARM_LEN);
+ } else {
+ sclp_get_loadparm_ascii(loadparm_str);
+ }
- sclp_get_loadparm_ascii(loadparm_str);
memcpy(lpmsg + 10, loadparm_str, 8);
puts(lpmsg);
@@ -193,8 +199,6 @@ static void boot_setup(void)
* so we don't taint our decision-making process during a reboot.
*/
memset((char *)S390EP, 0, 6);
-
- have_iplb = store_iplb(&iplb);
}
static bool find_boot_device(void)