|
|
6ae9ed |
From 3d07abddf4b080d2f33c668404d88be5679ec9ee Mon Sep 17 00:00:00 2001
|
|
|
6ae9ed |
Message-Id: <3d07abddf4b080d2f33c668404d88be5679ec9ee@dist-git>
|
|
|
6ae9ed |
From: Michal Privoznik <mprivozn@redhat.com>
|
|
|
6ae9ed |
Date: Fri, 5 Aug 2016 14:35:28 +0200
|
|
|
6ae9ed |
Subject: [PATCH] qemu: Advertise OVMF_CODE.secboot.fd
|
|
|
6ae9ed |
|
|
|
6ae9ed |
https://bugzilla.redhat.com/show_bug.cgi?id=1304483
|
|
|
6ae9ed |
|
|
|
6ae9ed |
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
6ae9ed |
(cherry picked from commit f522b7d2693f5804e1a12f2c3b0b6e5f4b1c85fd)
|
|
|
6ae9ed |
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
6ae9ed |
---
|
|
|
6ae9ed |
src/qemu/qemu.conf | 1 +
|
|
|
6ae9ed |
src/qemu/qemu_conf.c | 13 +++++++++----
|
|
|
6ae9ed |
2 files changed, 10 insertions(+), 4 deletions(-)
|
|
|
6ae9ed |
|
|
|
6ae9ed |
diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf
|
|
|
6ae9ed |
index 7964273..20bfb74 100644
|
|
|
6ae9ed |
--- a/src/qemu/qemu.conf
|
|
|
6ae9ed |
+++ b/src/qemu/qemu.conf
|
|
|
6ae9ed |
@@ -524,6 +524,7 @@
|
|
|
6ae9ed |
# follows this scheme.
|
|
|
6ae9ed |
#nvram = [
|
|
|
6ae9ed |
# "/usr/share/OVMF/OVMF_CODE.fd:/usr/share/OVMF/OVMF_VARS.fd",
|
|
|
6ae9ed |
+# "/usr/share/OVMF/OVMF_CODE.secboot.fd:/usr/share/OVMF/OVMF_VARS.fd",
|
|
|
6ae9ed |
# "/usr/share/AAVMF/AAVMF_CODE.fd:/usr/share/AAVMF/AAVMF_VARS.fd"
|
|
|
6ae9ed |
#]
|
|
|
6ae9ed |
|
|
|
6ae9ed |
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
|
|
|
6ae9ed |
index 49e8e8b..2fd7e51 100644
|
|
|
6ae9ed |
--- a/src/qemu/qemu_conf.c
|
|
|
6ae9ed |
+++ b/src/qemu/qemu_conf.c
|
|
|
6ae9ed |
@@ -126,6 +126,8 @@ void qemuDomainCmdlineDefFree(qemuDomainCmdlineDefPtr def)
|
|
|
6ae9ed |
|
|
|
6ae9ed |
#define VIR_QEMU_OVMF_LOADER_PATH "/usr/share/OVMF/OVMF_CODE.fd"
|
|
|
6ae9ed |
#define VIR_QEMU_OVMF_NVRAM_PATH "/usr/share/OVMF/OVMF_VARS.fd"
|
|
|
6ae9ed |
+#define VIR_QEMU_OVMF_SEC_LOADER_PATH "/usr/share/OVMF/OVMF_CODE.secboot.fd"
|
|
|
6ae9ed |
+#define VIR_QEMU_OVMF_SEC_NVRAM_PATH "/usr/share/OVMF/OVMF_VARS.fd"
|
|
|
6ae9ed |
#define VIR_QEMU_AAVMF_LOADER_PATH "/usr/share/AAVMF/AAVMF_CODE.fd"
|
|
|
6ae9ed |
#define VIR_QEMU_AAVMF_NVRAM_PATH "/usr/share/AAVMF/AAVMF_VARS.fd"
|
|
|
6ae9ed |
|
|
|
6ae9ed |
@@ -292,16 +294,19 @@ virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged)
|
|
|
6ae9ed |
goto error;
|
|
|
6ae9ed |
|
|
|
6ae9ed |
#else
|
|
|
6ae9ed |
- if (VIR_ALLOC_N(cfg->firmwares, 2) < 0)
|
|
|
6ae9ed |
+ if (VIR_ALLOC_N(cfg->firmwares, 3) < 0)
|
|
|
6ae9ed |
goto error;
|
|
|
6ae9ed |
- cfg->nfirmwares = 2;
|
|
|
6ae9ed |
- if (VIR_ALLOC(cfg->firmwares[0]) < 0 || VIR_ALLOC(cfg->firmwares[1]) < 0)
|
|
|
6ae9ed |
+ cfg->nfirmwares = 3;
|
|
|
6ae9ed |
+ if (VIR_ALLOC(cfg->firmwares[0]) < 0 || VIR_ALLOC(cfg->firmwares[1]) < 0 ||
|
|
|
6ae9ed |
+ VIR_ALLOC(cfg->firmwares[2]) < 0)
|
|
|
6ae9ed |
goto error;
|
|
|
6ae9ed |
|
|
|
6ae9ed |
if (VIR_STRDUP(cfg->firmwares[0]->name, VIR_QEMU_AAVMF_LOADER_PATH) < 0 ||
|
|
|
6ae9ed |
VIR_STRDUP(cfg->firmwares[0]->nvram, VIR_QEMU_AAVMF_NVRAM_PATH) < 0 ||
|
|
|
6ae9ed |
VIR_STRDUP(cfg->firmwares[1]->name, VIR_QEMU_OVMF_LOADER_PATH) < 0 ||
|
|
|
6ae9ed |
- VIR_STRDUP(cfg->firmwares[1]->nvram, VIR_QEMU_OVMF_NVRAM_PATH) < 0)
|
|
|
6ae9ed |
+ VIR_STRDUP(cfg->firmwares[1]->nvram, VIR_QEMU_OVMF_NVRAM_PATH) < 0 ||
|
|
|
6ae9ed |
+ VIR_STRDUP(cfg->firmwares[2]->name, VIR_QEMU_OVMF_SEC_LOADER_PATH) < 0 ||
|
|
|
6ae9ed |
+ VIR_STRDUP(cfg->firmwares[2]->nvram, VIR_QEMU_OVMF_SEC_NVRAM_PATH) < 0)
|
|
|
6ae9ed |
goto error;
|
|
|
6ae9ed |
#endif
|
|
|
6ae9ed |
|
|
|
6ae9ed |
--
|
|
|
6ae9ed |
2.9.2
|
|
|
6ae9ed |
|