[PATCH V2 6/6] libxl: Add support for ovmf firmware

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Populate libxl_domain_build_info struct with bios and firmware
info from virDomainLoaderDef.

Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxx>
---
 src/libxl/libxl_conf.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index c3d4f67..9877765 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -395,6 +395,14 @@ libxlMakeDomBuildInfo(virDomainDefPtr def,
             return -1;
 #endif
 
+        if (def->os.loader &&
+            def->os.loader->type == VIR_DOMAIN_LOADER_TYPE_PFLASH) {
+            b_info->u.hvm.bios = LIBXL_BIOS_TYPE_OVMF;
+            if (STRNEQ(def->os.loader->path, LIBXL_FIRMWARE_DIR "/ovmf.bin"))
+                if (VIR_STRDUP(b_info->u.hvm.firmware, def->os.loader->path) < 0)
+                    return -1;
+        }
+
         if (def->emulator) {
             if (!virFileExists(def->emulator)) {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-- 
2.8.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]