]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: Validate firmware configuration more thoroughly
authorAndrea Bolognani <abologna@redhat.com>
Wed, 15 Jun 2022 10:00:58 +0000 (12:00 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Fri, 1 Jul 2022 13:10:34 +0000 (15:10 +0200)
commitde2a338dcebde096d4806e43702513284607db8f
treef32e3db758381f51206c525a96611376ad02cfe7
parentf5dcd8b9796f7dacb9e91da17099d39c5622e328
conf: Validate firmware configuration more thoroughly

Generally speaking, when firmware autoselection is in use we
don't want any information to be provided manually. There are
two exceptions:

  * we still want the path to the NVRAM file to be customizable;

  * using <loader secure='yes'/> was how you would ask for a
    firmware that implements the Secure Boot feature in the
    original approach to firmware autoselection, so we want to
    keep that working.

Anything else should result in a descriptive error.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/327
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/domain_validate.c
tests/qemuxml2argvdata/firmware-auto-bios-nvram.x86_64-latest.err [new file with mode: 0644]
tests/qemuxml2argvdata/firmware-auto-bios-nvram.xml [new file with mode: 0644]
tests/qemuxml2argvdata/firmware-auto-efi-loader-insecure.x86_64-latest.err [new file with mode: 0644]
tests/qemuxml2argvdata/firmware-auto-efi-loader-insecure.xml [new file with mode: 0644]
tests/qemuxml2argvdata/firmware-auto-efi-loader-path.x86_64-latest.err [new file with mode: 0644]
tests/qemuxml2argvdata/firmware-auto-efi-loader-path.xml [new file with mode: 0644]
tests/qemuxml2argvtest.c