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

[Xen-devel] [PATCH v2 2/2] libxl: Fix nographic with upstream qemu



Fix xl nographic parameter with upstream qemu using vga none
instead of -nographic qemu parameter not working anymore and
deprecated.

Changes from v1:
- libxl_create.c:
 - add vga=none if nographic=1 only with upstream qemu
 - move setdefault of nographic up, otherwise xl create will
   fail if nographic xl paramter is not set

Signed-off-by: Fabio Fantoni <fabio.fantoni@xxxxxxx>
---
 tools/libxl/libxl_create.c |    8 ++++++--
 tools/libxl/libxl_dm.c     |    8 --------
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index a9735d0..79c0709 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -216,6 +216,12 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc,
         if (b_info->shadow_memkb == LIBXL_MEMKB_DEFAULT)
             b_info->shadow_memkb = 0;
 
+        libxl_defbool_setdefault(&b_info->u.hvm.nographic, false);
+
+        if (libxl_defbool_val(b_info->u.hvm.nographic) &&
+            b_info->device_model_version == 
LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN)
+            b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_NONE;
+
         if (!b_info->u.hvm.vga.kind)
             b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_CIRRUS;
 
@@ -326,8 +332,6 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc,
                                      false);
         }
 
-        libxl_defbool_setdefault(&b_info->u.hvm.nographic, false);
-
         libxl_defbool_setdefault(&b_info->u.hvm.gfx_passthru, false);
 
         break;
diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index ce63c9a..7f97d9e 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -472,10 +472,6 @@ static char ** 
libxl__build_device_model_args_new(libxl__gc *gc,
             flexarray_vappend(dm_args, "-serial", b_info->u.hvm.serial, NULL);
         }
 
-        if (libxl_defbool_val(b_info->u.hvm.nographic) && (!sdl && !vnc)) {
-            flexarray_append(dm_args, "-nographic");
-        }
-
         if (libxl_defbool_val(b_info->u.hvm.spice.enable)) {
             const libxl_spice_info *spice = &b_info->u.hvm.spice;
             char *spiceoptions = dm_spice_options(gc, spice);
@@ -619,10 +615,6 @@ static char ** 
libxl__build_device_model_args_new(libxl__gc *gc,
         if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
             flexarray_append(dm_args, "-gfx_passthru");
         }
-    } else {
-        if (!sdl && !vnc) {
-            flexarray_append(dm_args, "-nographic");
-        }
     }
 
     if (state->saved_state) {
-- 
1.7.9.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.