Thanks for the feedback! On 7/1/26 11:28 PM, Jared Rossi wrote: > > > On 7/1/26 4:49 PM, Zhuoying Cai wrote: >> If secure boot in audit mode or True Secure IPL mode is enabled without >> specifying a boot device, the boot process will terminate with an error. >> >> Signed-off-by: Zhuoying Cai <[email protected]> >> Reviewed-by: Thomas Huth <[email protected]> >> --- >> hw/s390x/ipl.c | 10 ++++++++++ >> 1 file changed, 10 insertions(+) >> >> diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c >> index 0d6a783d9f..f4e01b6918 100644 >> --- a/hw/s390x/ipl.c >> +++ b/hw/s390x/ipl.c >> @@ -865,6 +865,16 @@ void s390_ipl_prepare_cpu(S390CPU *cpu) >> cpu->env.psw.addr = ipl->bios_start_addr; >> if (!ipl->iplb_valid) { >> ipl->iplb_valid = s390_init_all_iplbs(ipl); >> + >> + /* >> + * Secure IPL without specifying a boot device. >> + * IPLB is not generated if no boot device is defined. >> + */ >> + if ((s390_has_certificate() || s390_secure_boot_enabled()) && >> + !ipl->iplb_valid) { >> + error_report("No boot device defined for Secure IPL"); >> + exit(1); >> + } >> } else { >> ipl->qipl.chain_len = 0; >> } > > I think this check should be introduced quite a bit earlier in the > series when audit mode is first added. Audit mode should give a warning > and continue, then this strict enforcement could be added with true > secure IPL mode. >
Sure, I can move it earlier. However, my understanding is that we should always exit when no boot device is specified, regardless of whether we're in audit or secure mode. For example, if multiple boot devices are specified, we would verify the current boot device and terminate immediately if it's unsupported in either mode. Based on that, it seems that having no valid boot device should also be a hard-stop condition. Please let me know what you think. Thanks! > Regards, > Jared Rossi
