aboutsummaryrefslogtreecommitdiff
path: root/hw/s390x
diff options
context:
space:
mode:
authorCollin L. Walling <walling@linux.vnet.ibm.com>2018-02-23 10:43:18 -0500
committerThomas Huth <thuth@redhat.com>2018-02-26 07:56:55 +0100
commit53b310ce539cfadf1f2fad5927a9e8f88ec9db13 (patch)
treee547ec372b8f009743f4cfc29ac340958bc6d10f /hw/s390x
parentdbf2091aba8abc312dbab931b12ebc4ff213ffd6 (diff)
downloadqemu-53b310ce539cfadf1f2fad5927a9e8f88ec9db13.zip
qemu-53b310ce539cfadf1f2fad5927a9e8f88ec9db13.tar.gz
qemu-53b310ce539cfadf1f2fad5927a9e8f88ec9db13.tar.bz2
s390-ccw: use zipl values when no boot menu options are present
If no boot menu options are present, then flag the boot menu to use the zipl options that were set in the zipl configuration file (and stored on disk by zipl). These options are found at some offset prior to the start of the zipl boot menu banner. The zipl timeout value is limited to a 16-bit unsigned integer and stored as seconds, so we take care to convert it to milliseconds in order to conform to the rest of the boot menu functionality. This is limited to CCW devices. For reference, the zipl configuration file uses the following fields in the menu section: prompt=1 enable the boot menu timeout=X set the timeout to X seconds To explicitly disregard any boot menu options, then menu=off or <bootmenu enable='no' ... /> must be specified. Signed-off-by: Collin L. Walling <walling@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'hw/s390x')
-rw-r--r--hw/s390x/ipl.c5
-rw-r--r--hw/s390x/ipl.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
index ee2039d..c12e460 100644
--- a/hw/s390x/ipl.c
+++ b/hw/s390x/ipl.c
@@ -241,6 +241,11 @@ static void s390_ipl_set_boot_menu(S390IPLState *ipl)
switch (ipl->iplb.pbt) {
case S390_IPL_TYPE_CCW:
+ /* In the absence of -boot menu, use zipl parameters */
+ if (!qemu_opt_get(opts, "menu")) {
+ *flags |= QIPL_FLAG_BM_OPTS_ZIPL;
+ return;
+ }
break;
default:
error_report("boot menu is not supported for this device type.");
diff --git a/hw/s390x/ipl.h b/hw/s390x/ipl.h
index d6c6f75..0570d0a 100644
--- a/hw/s390x/ipl.h
+++ b/hw/s390x/ipl.h
@@ -93,6 +93,7 @@ void s390_reipl_request(void);
/* Boot Menu flags */
#define QIPL_FLAG_BM_OPTS_CMD 0x80
+#define QIPL_FLAG_BM_OPTS_ZIPL 0x40
/*
* The QEMU IPL Parameters will be stored at absolute address