This patch fixes a few quirks regarding block device use for NVRAM backing and introduces support for populating the block device from template. Peter Krempa (13): qemuPrepareNVRAM: Don't attempt to create NVRAM on block device qemuFirmwareEnsureNVRAM: Don't try to setup non-local nvram qemu: Install backing store terminators for 'pflash' blockdevs conf: domain: Clarify nvram/loader format logic docs: formatdomain: Clarify that NVRAM template is also being autoselected firmware: Add 'templateFormat' XML attribute and plumb it in conf: domain: Output 'format' attribute of '<nvram>' also for' raw images conf: Always format firmware image format qemuPrepareNVRAM: Refuse conversion of NVRAM backing file format qemuFirmwareMatchDomain: Don't base firmware selection on nvram image format conf: Remove nonsensical requirement of nvram format matching firmware format qemu: process: Extract setup of file-backed nvram from template qemu: process: Introduce setup of block-device backed NVRAM docs/formatdomain.rst | 22 +-- src/conf/domain_conf.c | 62 +++++---- src/conf/domain_conf.h | 1 + src/conf/schemas/domaincommon.rng | 17 ++- src/qemu/qemu_domain.c | 2 + src/qemu/qemu_firmware.c | 47 ++++--- src/qemu/qemu_process.c | 127 +++++++++++++++--- .../aarch64-virt-graphics.aarch64-latest.xml | 4 +- ...ch64-virt-headless-mmio.aarch64-latest.xml | 4 +- .../aarch64-virt-headless.aarch64-latest.xml | 4 +- ...ware-auto-bios-stateless.x86_64-latest.xml | 2 +- .../firmware-auto-bios.x86_64-latest.xml | 2 +- ...efi-aarch64.aarch64-latest.abi-update.args | 4 +- ...-efi-aarch64.aarch64-latest.abi-update.xml | 2 +- ...rmware-auto-efi-aarch64.aarch64-latest.xml | 4 +- ...e-auto-efi-enrolled-keys.x86_64-latest.xml | 4 +- ...loader-qcow2-nvram-path.x86_64-latest.args | 4 +- ...-loader-qcow2-nvram-path.x86_64-latest.xml | 2 +- ...efi-format-loader-qcow2.x86_64-latest.args | 4 +- ...-efi-format-loader-qcow2.x86_64-latest.xml | 2 +- ...t-loader-raw.aarch64-latest.abi-update.xml | 4 +- ...o-efi-format-loader-raw.aarch64-latest.xml | 4 +- ...uto-efi-format-mismatch.x86_64-latest.args | 37 +++++ ...auto-efi-format-mismatch.x86_64-latest.err | 1 - ...auto-efi-format-mismatch.x86_64-latest.xml | 41 ++++++ .../firmware-auto-efi-format-mismatch.xml | 4 +- ...nvram-qcow2-network-nbd.x86_64-latest.args | 6 +- ...-nvram-qcow2-network-nbd.x86_64-latest.xml | 2 +- ...uto-efi-format-nvram-qcow2-network-nbd.xml | 2 +- ...format-nvram-qcow2-path.x86_64-latest.args | 4 +- ...-format-nvram-qcow2-path.x86_64-latest.xml | 2 +- ...-efi-format-nvram-qcow2.x86_64-latest.args | 4 +- ...o-efi-format-nvram-qcow2.x86_64-latest.xml | 2 +- ...auto-efi-loader-insecure.x86_64-latest.xml | 4 +- ...-loader-path-nonstandard.x86_64-latest.xml | 2 +- ...are-auto-efi-loader-path.x86_64-latest.xml | 4 +- ...oader-secure.x86_64-latest.abi-update.args | 4 +- ...loader-secure.x86_64-latest.abi-update.xml | 2 +- ...e-auto-efi-loader-secure.x86_64-latest.xml | 4 +- ...ngarch64.loongarch64-latest.abi-update.xml | 4 +- ...uto-efi-loongarch64.loongarch64-latest.xml | 4 +- ...uto-efi-no-enrolled-keys.x86_64-latest.xml | 4 +- ...ware-auto-efi-no-secboot.x86_64-latest.xml | 4 +- ...ware-auto-efi-nvram-file.x86_64-latest.xml | 4 +- ...-efi-nvram-network-iscsi.x86_64-latest.xml | 4 +- ...to-efi-nvram-network-nbd.x86_64-latest.xml | 4 +- ...ware-auto-efi-nvram-path.x86_64-latest.xml | 4 +- ...ram-template-nonstandard.x86_64-latest.xml | 2 +- ...-auto-efi-nvram-template.x86_64-latest.xml | 4 +- ...efi-riscv64.riscv64-latest.abi-update.args | 4 +- ...-efi-riscv64.riscv64-latest.abi-update.xml | 2 +- ...mware-auto-efi-rw-pflash.x86_64-latest.xml | 2 +- .../firmware-auto-efi-rw.x86_64-latest.xml | 2 +- ...irmware-auto-efi-secboot.x86_64-latest.xml | 4 +- ...irmware-auto-efi-smm-off.x86_64-latest.xml | 4 +- ...mware-auto-efi-stateless.x86_64-latest.xml | 2 +- ...are-auto-efi.x86_64-latest.abi-update.args | 4 +- ...ware-auto-efi.x86_64-latest.abi-update.xml | 2 +- .../firmware-auto-efi.x86_64-latest.xml | 4 +- ...re-manual-bios-stateless.x86_64-latest.xml | 2 +- .../firmware-manual-bios.x86_64-latest.xml | 2 +- ...fi-aarch64-legacy-paths.aarch64-latest.xml | 4 +- ...manual-efi-acpi-aarch64.aarch64-latest.xml | 4 +- ...ware-manual-efi-acpi-q35.x86_64-latest.xml | 4 +- ...ware-manual-efi-features.x86_64-latest.xml | 4 +- ...-loader-path-nonstandard.x86_64-latest.xml | 4 +- ...manual-efi-loader-secure.x86_64-latest.xml | 4 +- ...rolled-keys-legacy-paths.x86_64-latest.xml | 4 +- ...ual-efi-no-enrolled-keys.x86_64-latest.xml | 4 +- ...-no-secboot-legacy-paths.x86_64-latest.xml | 4 +- ...re-manual-efi-no-secboot.x86_64-latest.xml | 4 +- ...nual-efi-noacpi-aarch64.aarch64-latest.xml | 4 +- ...re-manual-efi-nvram-file.x86_64-latest.xml | 4 +- ...-efi-nvram-network-iscsi.x86_64-latest.xml | 4 +- ...al-efi-nvram-network-nbd.x86_64-latest.xml | 4 +- ...ram-template-nonstandard.x86_64-latest.xml | 4 +- ...anual-efi-nvram-template.x86_64-latest.xml | 4 +- ...e-manual-efi-rw-implicit.x86_64-latest.xml | 2 +- ...nual-efi-rw-legacy-paths.x86_64-latest.xml | 2 +- ...nual-efi-rw-modern-paths.x86_64-latest.xml | 2 +- .../firmware-manual-efi-rw.x86_64-latest.xml | 2 +- ...efi-secboot-legacy-paths.x86_64-latest.xml | 4 +- ...mware-manual-efi-secboot.x86_64-latest.xml | 4 +- ...are-manual-efi-stateless.x86_64-latest.xml | 2 +- .../firmware-manual-efi.x86_64-latest.xml | 4 +- ...f-aarch64-virt-headless.aarch64-latest.xml | 4 +- .../hvf-x86_64-q35-headless.x86_64-latest.xml | 4 +- .../pvpanic-pci-aarch64.aarch64-latest.xml | 4 +- ...-pci-no-address-aarch64.aarch64-latest.xml | 4 +- .../virtio-iommu-aarch64.aarch64-latest.xml | 4 +- tests/qemuxmlconftest.c | 2 +- .../test-disk-positional-parms-full.xml | 2 +- .../test-disk-positional-parms-partial.xml | 2 +- tests/xlconfigdata/test-disk-qed.xml | 2 +- .../xlconfigdata/test-fullvirt-acpi-slic.xml | 2 +- tests/xlconfigdata/test-fullvirt-cpuid.xml | 2 +- ...ullvirt-direct-kernel-boot-bogus-extra.xml | 2 +- ...test-fullvirt-direct-kernel-boot-extra.xml | 2 +- .../test-fullvirt-direct-kernel-boot.xml | 2 +- .../xlconfigdata/test-fullvirt-hpet-timer.xml | 2 +- .../test-fullvirt-hypervisor-features.xml | 2 +- .../test-fullvirt-multi-timer.xml | 2 +- .../test-fullvirt-multiserial.xml | 2 +- tests/xlconfigdata/test-fullvirt-multiusb.xml | 2 +- .../test-fullvirt-nestedhvm-disabled.xml | 2 +- .../xlconfigdata/test-fullvirt-nestedhvm.xml | 2 +- tests/xlconfigdata/test-fullvirt-nohap.xml | 2 +- tests/xlconfigdata/test-fullvirt-ovmf.xml | 2 +- .../test-fullvirt-ovswitch-tagged.xml | 2 +- .../test-fullvirt-ovswitch-trunked.xml | 2 +- tests/xlconfigdata/test-fullvirt-pci.xml | 2 +- .../xlconfigdata/test-fullvirt-tsc-timer.xml | 2 +- tests/xlconfigdata/test-fullvirt-type.xml | 2 +- tests/xlconfigdata/test-fullvirt-vnuma.xml | 2 +- tests/xlconfigdata/test-net-fakemodel.xml | 2 +- tests/xlconfigdata/test-new-disk.xml | 2 +- tests/xlconfigdata/test-qemu-passthrough.xml | 2 +- .../test-rbd-multihost-noauth.xml | 2 +- tests/xlconfigdata/test-spice-features.xml | 2 +- tests/xlconfigdata/test-spice.xml | 2 +- tests/xlconfigdata/test-vif-multi-ip.xml | 2 +- tests/xlconfigdata/test-vif-rate.xml | 2 +- tests/xlconfigdata/test-vif-typename.xml | 2 +- tests/xmconfigdata/test-escape-paths.xml | 2 +- .../test-fullvirt-default-feature.xml | 2 +- .../xmconfigdata/test-fullvirt-force-hpet.xml | 2 +- .../test-fullvirt-force-nohpet.xml | 2 +- .../xmconfigdata/test-fullvirt-localtime.xml | 2 +- .../test-fullvirt-net-netfront.xml | 2 +- .../xmconfigdata/test-fullvirt-new-cdrom.xml | 2 +- tests/xmconfigdata/test-fullvirt-nohap.xml | 2 +- .../test-fullvirt-parallel-tcp.xml | 2 +- .../test-fullvirt-serial-file.xml | 2 +- .../test-fullvirt-serial-null.xml | 2 +- .../test-fullvirt-serial-pipe.xml | 2 +- .../xmconfigdata/test-fullvirt-serial-pty.xml | 2 +- .../test-fullvirt-serial-stdio.xml | 2 +- .../test-fullvirt-serial-tcp-telnet.xml | 2 +- .../xmconfigdata/test-fullvirt-serial-tcp.xml | 2 +- .../xmconfigdata/test-fullvirt-serial-udp.xml | 2 +- .../test-fullvirt-serial-unix.xml | 2 +- tests/xmconfigdata/test-fullvirt-sound.xml | 2 +- tests/xmconfigdata/test-fullvirt-usbmouse.xml | 2 +- .../xmconfigdata/test-fullvirt-usbtablet.xml | 2 +- tests/xmconfigdata/test-fullvirt-utc.xml | 2 +- tests/xmconfigdata/test-no-source-cdrom.xml | 2 +- tests/xmconfigdata/test-pci-dev-syntax.xml | 2 +- tests/xmconfigdata/test-pci-devs.xml | 2 +- 148 files changed, 481 insertions(+), 266 deletions(-) create mode 100644 tests/qemuxmlconfdata/firmware-auto-efi-format-mismatch.x86_64-latest.args delete mode 100644 tests/qemuxmlconfdata/firmware-auto-efi-format-mismatch.x86_64-latest.err create mode 100644 tests/qemuxmlconfdata/firmware-auto-efi-format-mismatch.x86_64-latest.xml -- 2.47.0