@@ -1262,6 +1262,14 @@ SRST
A colon may be used to delineate multiple paths.
ERST
+DEF("secure-boot", HAS_ARG, QEMU_OPTION_secure_boot,
+ "-secure-boot on|off\n"
+ " enable/disable secure boot\n", QEMU_ARCH_S390X)
+SRST
+``-secure-boot on|off``
+ Enable/disable secure boot. Default is off.
+ERST
+
DEFHEADING()
DEFHEADING(Block device options:)
@@ -524,6 +524,19 @@ static QemuOptsList qemu_boot_certificates_opts = {
},
};
+static QemuOptsList qemu_secure_boot_opts = {
+ .name = "secure-boot",
+ .implied_opt_name = "secure-boot",
+ .head = QTAILQ_HEAD_INITIALIZER(qemu_secure_boot_opts.head),
+ .desc = {
+ {
+ .name = "secure-boot",
+ .type = QEMU_OPT_BOOL,
+ },
+ { /* end of list */ }
+ },
+};
+
const char *qemu_get_vm_name(void)
{
return qemu_name;
@@ -2894,6 +2907,7 @@ void qemu_init(int argc, char **argv)
qemu_add_opts(&qemu_fw_cfg_opts);
qemu_add_opts(&qemu_action_opts);
qemu_add_opts(&qemu_boot_certificates_opts);
+ qemu_add_opts(&qemu_secure_boot_opts);
qemu_add_run_with_opts();
module_call_init(MODULE_INIT_OPTS);
@@ -3046,6 +3060,13 @@ void qemu_init(int argc, char **argv)
exit(1);
}
break;
+ case QEMU_OPTION_secure_boot:
+ opts = qemu_opts_parse_noisily(qemu_find_opts("secure-boot"),
+ optarg, true);
+ if (!opts) {
+ exit(1);
+ }
+ break;
case QEMU_OPTION_fda:
case QEMU_OPTION_fdb:
drive_add(IF_FLOPPY, popt->index - QEMU_OPTION_fda,
The `-secure-boot on|off` command line option is implemented to enable secure IPL. By default, -secure-boot is set to false if not specified in the command line. Signed-off-by: Zhuoying Cai <zycai@linux.ibm.com> --- qemu-options.hx | 8 ++++++++ system/vl.c | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+)