Secure IPL was recently added to QEMU for s390x. The s390x CCW BIOS verifies the signature of the boot image against X.509 certificates supplied by the host. It is controlled by two machine properties on s390-ccw-virtio: boot-certs.N.path=<path> one or more X.509 certificates or directories of certificates secure-boot=on|off enable or disable secure boot Together they give three modes: Mode QEMU configuration Behavior ------ ----------------------- --------------------------------- Off no secure-boot, No verification no boot-certs Audit boot-certs only Verification failures are reported as non-disruptive warnings, and boot continues Secure secure-boot=on and Verification failures are boot-certs reported and abort the boot Please refer to the QEMU documentation for more details: https://www.qemu.org/docs/master/system/s390x/secure-ipl.html Libvirt needs a domain XML interface that exposes Secure IPL on s390x. This RFC describes two candidate designs so we can agree on one before finalizing the implementation. Design 1: firmware feature + new <boot-certs> element ===================================================== <os> <type arch='s390x' machine='s390-ccw-virtio-11.2'>hvm</type> <firmware> <feature enabled='yes' name='secure-boot'/> </firmware> <boot-certs> <path>/path/to/cert_dir</path> <path>/path/to/cert1.pem</path> </boot-certs> </os> Mode XML ------ ------------------------------------------------------ Off neither <feature name='secure-boot'/> nor <boot-certs> present Audit <boot-certs> present, with either <feature name='secure-boot' enabled='no'/> or no secure-boot <feature> element Secure <feature name='secure-boot' enabled='yes'/> and <boot-certs> Benefits: 1. Reuses the existing <firmware><feature> elements. 2. The elements are already parsed. Drawbacks: 1. <firmware> exists for firmware autoselection. On other architectures it selects a firmware build. On s390x no firmware is selected and the feature only toggles a machine property. Reusing it means special-casing s390x in the firmware code. For reference, I previously explored this approach in an RFC on the libvirt mailing list: https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/OMABQ... The linked series is provided only as an example of how these elements could be parsed on s390x and is not intended for review at this time. Design 2: dedicated <ipl><secure> element ========================================= <os> <type arch='s390x' machine='s390-ccw-virtio-11.2'>hvm</type> <ipl> <secure audit='on|off'> <path>/path/to/cert_dir</path> <path>/path/to/cert1.pem</path> </secure> </ipl> </os> Mode XML ------ ------------------------------------------------------ Off no <ipl><secure> Audit <secure audit='on'> Secure <secure> or <secure audit='off'> * audit is optional. * audit defaults to 'off' if not specified, which means <secure> and <secure audit='off'> are equivalent. Both map to secure-boot=on in QEMU. * <path> has the same meaning as in Design 1. Benefits: 1. The mode and its certificates are in one element, so the dependency between them is visible in the XML. 2. Firmware autoselection is untouched, so there are no s390x special cases in the firmware code. 3. <ipl> can hold future IPL options without adding more top-level <os> children. Drawbacks: 1. New element and schema. 2. Two syntaxes for secure boot: <firmware><feature> for UEFI and <ipl><secure> for s390x. Both designs expose the same feature and can produce the same QEMU configuration. They differ in where the configuration lives in the XML. Design 1 reuses <firmware>, which exists for firmware autoselection, and splits the mode from its certificates. Design 2 keeps the mode and certificates together and leaves the firmware code alone, at the cost of a new element and schema. Feedback and suggestions are welcome on which design to use, on improvements needed for the preferred design, or on any completely new design. Thank you for your time, Joy