]> xenbits.xensource.com Git - people/aperard/libvirt.git/commitdiff
libxl_conf: Parse "vkb_device"
authorAnthony PERARD <anthony.perard@gmail.com>
Thu, 18 Jan 2024 14:40:08 +0000 (14:40 +0000)
committerAnthony PERARD <anthony.perard@gmail.com>
Thu, 18 Jan 2024 16:19:49 +0000 (16:19 +0000)
Needed to work around issue with Debian bookworm boot.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
src/libxl/libxl_conf.c
src/libxl/libxl_conf.h

index 62e1be66726e190b3568702bcf3fe9c7ed0b95fc..5f7ca5d55fc780e8b139445d3bafd2cbdc45de6d 100644 (file)
@@ -716,6 +716,11 @@ libxlMakeDomBuildInfo(virDomainDef *def,
         libxl_defbool_set(&b_info->u.hvm.vnc.enable, 0);
         libxl_defbool_set(&b_info->u.hvm.sdl.enable, 0);
 
+#ifdef LIBXL_HAVE_BUILDINFO_VKB_DEVICE
+        if (cfg->has_vkb_device)
+            libxl_defbool_set(&b_info->u.hvm.vkb_device, cfg->vkb_device);
+#endif
+
         for (i = 0; i < def->ninputs; i++) {
             char **usbdevice;
 
@@ -1830,6 +1835,7 @@ int libxlDriverConfigLoadFile(libxlDriverConfig *cfg,
                               const char *filename)
 {
     g_autoptr(virConf) conf = NULL;
+    int r;
 
     /* Check the file is readable before opening it, otherwise
      * libvirt emits an error.
@@ -1858,6 +1864,12 @@ int libxlDriverConfigLoadFile(libxlDriverConfig *cfg,
     if (virConfGetValueBool(conf, "nested_hvm", &cfg->nested_hvm) < 0)
         return -1;
 
+    r = virConfGetValueBool(conf, "vkb_device", &cfg->vkb_device);
+    if (r == 1)
+        cfg->has_vkb_device = true;
+    if (r  < 0)
+        return -1;
+
     return 0;
 }
 
index 7087b41079e8bfaafd78ee2b06141681a30c35de..c24a66564982781afb6f8b2dfc19a3a17dcb50f7 100644 (file)
@@ -101,6 +101,9 @@ struct _libxlDriverConfig {
 
     virFirmware **firmwares;
     size_t nfirmwares;
+
+    bool has_vkb_device;
+    bool vkb_device;
 };
 
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(libxlDriverConfig, virObjectUnref);