One of the things I've spotted while playing with OVMF is, that on different architectures the OVMF firmware has different names. Like arm and aarch64: it's AAVMF_{CODE,VARS}.fd. We should reflect that. Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- src/qemu/qemu.conf | 5 ++++- src/qemu/qemu_conf.c | 9 +++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf index c6db568..36cacf9 100644 --- a/src/qemu/qemu.conf +++ b/src/qemu/qemu.conf @@ -507,5 +507,8 @@ # a list of strings when a single item is in form of: # ${PATH_TO_UEFI_FW}:${PATH_TO_UEFI_VARS}. # Later, when libvirt creates per domain variable store, this -# list is searched for the master image. +# list is searched for the master image. The UEFI firmware can be +# called differently on different architectures. For instance, +# it's OVMF on x86_64 and i686, but it's AAVMF on aarch64. The +# libvirt default follows this scheme. #nvram = [ "/usr/share/OVMF/OVMF_CODE.fd:/usr/share/OVMF/OVMF_VARS.fd" ] diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 4764bef..6c038c3 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -107,8 +107,13 @@ void qemuDomainCmdlineDefFree(qemuDomainCmdlineDefPtr def) VIR_FREE(def); } -#define VIR_QEMU_LOADER_FILE_PATH "/usr/share/OVMF/OVMF_CODE.fd" -#define VIR_QEMU_NVRAM_FILE_PATH "/usr/share/OVMF/OVMF_VARS.fd" +#if defined(__arm__) || defined(__aarch64__) +# define VIR_QEMU_LOADER_FILE_PATH "/usr/share/AAVMF/AAVMF_CODE.fd" +# define VIR_QEMU_NVRAM_FILE_PATH "/usr/share/AAVMF/AAVMF_VARS.fd" +#else +# define VIR_QEMU_LOADER_FILE_PATH "/usr/share/OVMF/OVMF_CODE.fd" +# define VIR_QEMU_NVRAM_FILE_PATH "/usr/share/OVMF/OVMF_VARS.fd" +#endif virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged) { -- 2.0.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list