From: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
To: Thomas Huth <thuth@redhat.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
"Collin L. Walling" <walling@linux.vnet.ibm.com>,
qemu-s390x@nongnu.org, qemu-devel@nongnu.org
Cc: frankja@linux.vnet.ibm.com, cohuck@redhat.com, david@redhat.com,
alifm@linux.vnet.ibm.com, eblake@redhat.com
Subject: Re: [Qemu-devel] [PATCH v8 00/13] Interactive Boot Menu for DASD and SCSI Guests on s390x
Date: Fri, 23 Feb 2018 12:50:40 +0100 [thread overview]
Message-ID: <68148fff-0c6e-0470-a0e5-0379ecfd3dd8@linux.vnet.ibm.com> (raw)
In-Reply-To: <5fd04c0d-ad1e-13a7-4e5a-5f28662479a7@redhat.com>
On 23.02.2018 11:17, Thomas Huth wrote:
> On 23.02.2018 09:53, Christian Borntraeger wrote:
>> Hmmm, on my ubuntu 16.04 guest, I get the boot menu with no timeout even if I do not
>> specify loadparm or boot menu:
>>
>> qemu-kvm -drive file=/var/lib/libvirt/qemu/image.zhyp140,if=none,id=d1 -device virtio-blk-ccw,drive=d1,bootindex=1
>
> I can reproduce this now, too. FWIW: It only happens with
> virtio-blk-ccw, not with virtio-scsi-ccw (that's why I did not notice it
> first). Collin, can you reproduce this, too?
>
> Thomas
> The idea is to support the zipl boot menu on ECKD disks (which have a timeout by themselves)
even without switching the boot menu on. This is to have the same behavior as one would see
on LPAR or z/VM.
The issue is that the boot code tries to interpret the program table of SCSI bootmaps as if
a boot menu has been specified.
The following patch fixes this. Collin might want to have a say in this matter as well.
The scsi program table was erroneously evaluated as implicit
boot menu. This patch adds a per-bootmap-type menu_is_enabled
function.
Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
---
pc-bios/s390-ccw/bootmap.c | 4 ++--
| 7 ++++++-
pc-bios/s390-ccw/s390-ccw.h | 3 ++-
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/pc-bios/s390-ccw/bootmap.c b/pc-bios/s390-ccw/bootmap.c
index 81dbd4a..b6fd77e 100644
--- a/pc-bios/s390-ccw/bootmap.c
+++ b/pc-bios/s390-ccw/bootmap.c
@@ -265,7 +265,7 @@ static void run_eckd_boot_script(block_number_t bmt_block_nr,
BootMapTable *bmt = (void *)sec;
BootMapScript *bms = (void *)sec;
- if (menu_is_enabled()) {
+ if (menu_is_enabled_for_zipl()) {
loadparm = eckd_get_boot_menu_index(s1b_block_nr);
}
@@ -568,7 +568,7 @@ static void ipl_scsi(void)
debug_print_int("program table entries", program_table_entries);
IPL_assert(program_table_entries != 0, "Empty Program Table");
- if (menu_is_enabled()) {
+ if (menu_is_enabled_for_enum()) {
loadparm = menu_get_enum_boot_index(program_table_entries);
}
--git a/pc-bios/s390-ccw/menu.c b/pc-bios/s390-ccw/menu.c
index 16b5310..ebe5e9f 100644
--- a/pc-bios/s390-ccw/menu.c
+++ b/pc-bios/s390-ccw/menu.c
@@ -237,7 +237,12 @@ void menu_set_parms(uint8_t boot_menu_flag, uint32_t boot_menu_timeout)
timeout = boot_menu_timeout;
}
-bool menu_is_enabled(void)
+bool menu_is_enabled_for_zipl(void)
{
return flag;
}
+
+bool menu_is_enabled_for_enum(void)
+{
+ return flag & ~QIPL_FLAG_BM_OPTS_ZIPL;
+}
diff --git a/pc-bios/s390-ccw/s390-ccw.h b/pc-bios/s390-ccw/s390-ccw.h
index cfcaf3c..a18381f 100644
--- a/pc-bios/s390-ccw/s390-ccw.h
+++ b/pc-bios/s390-ccw/s390-ccw.h
@@ -89,7 +89,8 @@ void zipl_load(void);
/* menu.c */
void menu_set_parms(uint8_t boot_menu_flag, uint32_t boot_menu_timeout);
-bool menu_is_enabled(void);
+bool menu_is_enabled_for_zipl(void);
+bool menu_is_enabled_for_enum(void);
int menu_get_zipl_boot_index(const char *menu_data);
int menu_get_enum_boot_index(int entries);
--
1.9.1
--
Regards,
Viktor Mihajlovski
next prev parent reply other threads:[~2018-02-23 11:50 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-21 19:35 [Qemu-devel] [PATCH v8 00/13] Interactive Boot Menu for DASD and SCSI Guests on s390x Collin L. Walling
2018-02-21 19:35 ` [Qemu-devel] [PATCH v8 01/13] s390-ccw: refactor boot map table code Collin L. Walling
2018-02-21 19:35 ` [Qemu-devel] [PATCH v8 02/13] s390-ccw: refactor eckd_block_num to use CHS Collin L. Walling
2018-02-21 19:35 ` [Qemu-devel] [PATCH v8 03/13] s390-ccw: refactor IPL structs Collin L. Walling
2018-02-21 19:35 ` [Qemu-devel] [PATCH v8 04/13] s390-ccw: update libc Collin L. Walling
2018-02-22 4:30 ` [Qemu-devel] [qemu-s390x] " Thomas Huth
2018-02-21 19:35 ` [Qemu-devel] [PATCH v8 05/13] s390-ccw: move auxiliary IPL data to separate location Collin L. Walling
2018-02-22 4:40 ` [Qemu-devel] [qemu-s390x] " Thomas Huth
2018-02-22 8:38 ` Viktor Mihajlovski
2018-02-21 19:35 ` [Qemu-devel] [PATCH v8 06/13] s390-ccw: parse and set boot menu options Collin L. Walling
2018-02-22 5:32 ` [Qemu-devel] [qemu-s390x] " Thomas Huth
2018-02-21 19:35 ` [Qemu-devel] [PATCH v8 07/13] s390-ccw: set up interactive boot menu parameters Collin L. Walling
2018-02-21 19:35 ` [Qemu-devel] [PATCH v8 08/13] s390-ccw: read stage2 boot loader data to find menu Collin L. Walling
2018-02-21 19:35 ` [Qemu-devel] [PATCH v8 09/13] s390-ccw: print zipl boot menu Collin L. Walling
2018-02-21 19:35 ` [Qemu-devel] [PATCH v8 10/13] s390-ccw: read user input for boot index via the SCLP console Collin L. Walling
2018-02-21 19:35 ` [Qemu-devel] [PATCH v8 11/13] s390-ccw: set cp_receive mask only when needed and consume pending service irqs Collin L. Walling
2018-02-22 6:19 ` [Qemu-devel] [qemu-s390x] " Thomas Huth
2018-02-21 19:35 ` [Qemu-devel] [PATCH v8 12/13] s390-ccw: use zipl values when no boot menu options are present Collin L. Walling
2018-02-22 6:27 ` [Qemu-devel] [qemu-s390x] " Thomas Huth
2018-02-21 19:35 ` [Qemu-devel] [PATCH v8 13/13] s390-ccw: interactive boot menu for scsi Collin L. Walling
2018-02-22 6:34 ` [Qemu-devel] [qemu-s390x] " Thomas Huth
2018-02-22 11:51 ` [Qemu-devel] [PATCH v8 00/13] Interactive Boot Menu for DASD and SCSI Guests on s390x Christian Borntraeger
2018-02-22 12:23 ` Viktor Mihajlovski
2018-02-22 15:40 ` [Qemu-devel] [qemu-s390x] " Collin L. Walling
2018-02-22 15:44 ` Christian Borntraeger
2018-02-22 16:45 ` Collin L. Walling
2018-02-22 19:40 ` Collin L. Walling
2018-02-23 10:07 ` Thomas Huth
2018-02-23 10:11 ` Christian Borntraeger
2018-02-23 14:57 ` Collin L. Walling
2018-02-23 14:59 ` Collin L. Walling
2018-02-23 15:01 ` Christian Borntraeger
2018-02-22 12:42 ` Thomas Huth
2018-02-23 8:53 ` [Qemu-devel] " Christian Borntraeger
2018-02-23 10:17 ` Thomas Huth
2018-02-23 11:50 ` Viktor Mihajlovski [this message]
2018-02-23 13:33 ` Thomas Huth
2018-02-23 15:03 ` Collin L. Walling
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=68148fff-0c6e-0470-a0e5-0379ecfd3dd8@linux.vnet.ibm.com \
--to=mihajlov@linux.vnet.ibm.com \
--cc=alifm@linux.vnet.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=eblake@redhat.com \
--cc=frankja@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=thuth@redhat.com \
--cc=walling@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).