Usage: vga="none" With upstream qemu it was impossible to disable emulated vga, even with -nographic qemu parameter setted with nographic xl paramter. Note: Tested only with upstream qemu. With the qemu-trad. it probably needs also the addition of -nographic qemu parameter. Can someone test it with the traditional or should I do it? Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz> --- docs/man/xl.cfg.pod.5 | 2 +- tools/libxl/libxl_create.c | 4 ++++ tools/libxl/libxl_dm.c | 3 +++ tools/libxl/libxl_types.idl | 1 + tools/libxl/xl_cmdimpl.c | 2 ++ 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5 index 3dedd61..402a414 100644 --- a/docs/man/xl.cfg.pod.5 +++ b/docs/man/xl.cfg.pod.5 @@ -1050,7 +1050,7 @@ This option is deprecated, use vga="stdvga" instead. =item B<vga="STRING"> -Selects the emulated video card (stdvga|cirrus). +Selects the emulated video card (none|stdvga|cirrus). The default is cirrus. =item B<vnc=BOOLEAN> diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index 2bb33e9..a9735d0 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -222,6 +222,8 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc, switch (b_info->device_model_version) { case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL: switch (b_info->u.hvm.vga.kind) { + case LIBXL_VGA_INTERFACE_TYPE_NONE: + break; case LIBXL_VGA_INTERFACE_TYPE_STD: if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT) b_info->video_memkb = 8 * 1024; @@ -242,6 +244,8 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc, case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN: default: switch (b_info->u.hvm.vga.kind) { + case LIBXL_VGA_INTERFACE_TYPE_NONE: + break; case LIBXL_VGA_INTERFACE_TYPE_STD: if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT) b_info->video_memkb = 16 * 1024; diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index 7be0a50..086e602 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -199,6 +199,7 @@ static char ** libxl__build_device_model_args_old(libxl__gc *gc, flexarray_append(dm_args, "-std-vga"); break; case LIBXL_VGA_INTERFACE_TYPE_CIRRUS: + case LIBXL_VGA_INTERFACE_TYPE_NONE: break; } @@ -498,6 +499,8 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc, GCSPRINTF("vga.vram_size_mb=%d", libxl__sizekb_to_mb(b_info->video_memkb))); break; + case LIBXL_VGA_INTERFACE_TYPE_NONE: + break; } if (b_info->u.hvm.boot) { diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl index 44c1891..22a2528 100644 --- a/tools/libxl/libxl_types.idl +++ b/tools/libxl/libxl_types.idl @@ -153,6 +153,7 @@ libxl_shutdown_reason = Enumeration("shutdown_reason", [ libxl_vga_interface_type = Enumeration("vga_interface_type", [ (1, "CIRRUS"), (2, "STD"), + (3, "NONE"), ], init_val = 1) libxl_vendor_device = Enumeration("vendor_device", [ diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index ddb80d6..c823516 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -1497,6 +1497,8 @@ skip_vfb: b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_STD; } else if (!strcmp(buf, "cirrus")) { b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_CIRRUS; + } else if (!strcmp(buf, "none")) { + b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_NONE; } else { fprintf(stderr, "Unknown vga \"%s\" specified\n", buf); exit(1); -- 1.7.9.5
Fix xl nographic parameter with upstream qemu using vga none instead of -nographic qemu parameter not working anymore and deprecated. Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz> --- tools/libxl/libxl_create.c | 3 +++ tools/libxl/libxl_dm.c | 8 -------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index a9735d0..5fa393f 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -216,6 +216,9 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc, if (b_info->shadow_memkb == LIBXL_MEMKB_DEFAULT) b_info->shadow_memkb = 0; + if (libxl_defbool_val(b_info->u.hvm.nographic)) + 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; diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index 086e602..81a818c 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -469,10 +469,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); @@ -616,10 +612,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
On Fri, 15 Nov 2013, Fabio Fantoni wrote:> Usage: > vga="none" > > With upstream qemu it was impossible to disable emulated vga, > even with -nographic qemu parameter setted with nographic xl > paramter. > > Note: > Tested only with upstream qemu. With the qemu-trad. it probably > needs also the addition of -nographic qemu parameter. > Can someone test it with the traditional or should I do it? > > Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz> > --- > docs/man/xl.cfg.pod.5 | 2 +- > tools/libxl/libxl_create.c | 4 ++++ > tools/libxl/libxl_dm.c | 3 +++ > tools/libxl/libxl_types.idl | 1 + > tools/libxl/xl_cmdimpl.c | 2 ++ > 5 files changed, 11 insertions(+), 1 deletion(-) > > diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5 > index 3dedd61..402a414 100644 > --- a/docs/man/xl.cfg.pod.5 > +++ b/docs/man/xl.cfg.pod.5 > @@ -1050,7 +1050,7 @@ This option is deprecated, use vga="stdvga" instead. > > =item B<vga="STRING"> > > -Selects the emulated video card (stdvga|cirrus). > +Selects the emulated video card (none|stdvga|cirrus). > The default is cirrus. > > =item B<vnc=BOOLEAN> > diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c > index 2bb33e9..a9735d0 100644 > --- a/tools/libxl/libxl_create.c > +++ b/tools/libxl/libxl_create.c > @@ -222,6 +222,8 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc, > switch (b_info->device_model_version) { > case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL: > switch (b_info->u.hvm.vga.kind) { > + case LIBXL_VGA_INTERFACE_TYPE_NONE: > + break; > case LIBXL_VGA_INTERFACE_TYPE_STD: > if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT) > b_info->video_memkb = 8 * 1024; > @@ -242,6 +244,8 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc, > case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN: > default: > switch (b_info->u.hvm.vga.kind) { > + case LIBXL_VGA_INTERFACE_TYPE_NONE: > + break; > case LIBXL_VGA_INTERFACE_TYPE_STD: > if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT) > b_info->video_memkb = 16 * 1024; > diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c > index 7be0a50..086e602 100644 > --- a/tools/libxl/libxl_dm.c > +++ b/tools/libxl/libxl_dm.c > @@ -199,6 +199,7 @@ static char ** libxl__build_device_model_args_old(libxl__gc *gc, > flexarray_append(dm_args, "-std-vga"); > break; > case LIBXL_VGA_INTERFACE_TYPE_CIRRUS: > + case LIBXL_VGA_INTERFACE_TYPE_NONE: > break; > } > > @@ -498,6 +499,8 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc, > GCSPRINTF("vga.vram_size_mb=%d", > libxl__sizekb_to_mb(b_info->video_memkb))); > break; > + case LIBXL_VGA_INTERFACE_TYPE_NONE: > + break; > }Shouldn''t we be passing -vga none to QEMU instead of nothing at all?
Il 15/11/2013 12:49, Stefano Stabellini ha scritto:> On Fri, 15 Nov 2013, Fabio Fantoni wrote: >> Usage: >> vga="none" >> >> With upstream qemu it was impossible to disable emulated vga, >> even with -nographic qemu parameter setted with nographic xl >> paramter. >> >> Note: >> Tested only with upstream qemu. With the qemu-trad. it probably >> needs also the addition of -nographic qemu parameter. >> Can someone test it with the traditional or should I do it? >> >> Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz> >> --- >> docs/man/xl.cfg.pod.5 | 2 +- >> tools/libxl/libxl_create.c | 4 ++++ >> tools/libxl/libxl_dm.c | 3 +++ >> tools/libxl/libxl_types.idl | 1 + >> tools/libxl/xl_cmdimpl.c | 2 ++ >> 5 files changed, 11 insertions(+), 1 deletion(-) >> >> diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5 >> index 3dedd61..402a414 100644 >> --- a/docs/man/xl.cfg.pod.5 >> +++ b/docs/man/xl.cfg.pod.5 >> @@ -1050,7 +1050,7 @@ This option is deprecated, use vga="stdvga" instead. >> >> =item B<vga="STRING"> >> >> -Selects the emulated video card (stdvga|cirrus). >> +Selects the emulated video card (none|stdvga|cirrus). >> The default is cirrus. >> >> =item B<vnc=BOOLEAN> >> diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c >> index 2bb33e9..a9735d0 100644 >> --- a/tools/libxl/libxl_create.c >> +++ b/tools/libxl/libxl_create.c >> @@ -222,6 +222,8 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc, >> switch (b_info->device_model_version) { >> case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL: >> switch (b_info->u.hvm.vga.kind) { >> + case LIBXL_VGA_INTERFACE_TYPE_NONE: >> + break; >> case LIBXL_VGA_INTERFACE_TYPE_STD: >> if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT) >> b_info->video_memkb = 8 * 1024; >> @@ -242,6 +244,8 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc, >> case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN: >> default: >> switch (b_info->u.hvm.vga.kind) { >> + case LIBXL_VGA_INTERFACE_TYPE_NONE: >> + break; >> case LIBXL_VGA_INTERFACE_TYPE_STD: >> if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT) >> b_info->video_memkb = 16 * 1024; >> diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c >> index 7be0a50..086e602 100644 >> --- a/tools/libxl/libxl_dm.c >> +++ b/tools/libxl/libxl_dm.c >> @@ -199,6 +199,7 @@ static char ** libxl__build_device_model_args_old(libxl__gc *gc, >> flexarray_append(dm_args, "-std-vga"); >> break; >> case LIBXL_VGA_INTERFACE_TYPE_CIRRUS: >> + case LIBXL_VGA_INTERFACE_TYPE_NONE: >> break; >> } >> >> @@ -498,6 +499,8 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc, >> GCSPRINTF("vga.vram_size_mb=%d", >> libxl__sizekb_to_mb(b_info->video_memkb))); >> break; >> + case LIBXL_VGA_INTERFACE_TYPE_NONE: >> + break; >> } > Shouldn''t we be passing -vga none to QEMU instead of nothing at all?Is not needed, there is already -nodefaults and -vga is also deprecated and following the qemu docs: http://xenbits.xen.org/gitweb/?p=qemu-upstream-unstable.git;a=blob;f=docs/qdev-device-use.txt the new parameter for replace -vga=none is -nodefaults the -nodefaults patch is already on git: http://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=6ef823fdfa701b3659e4161520f43b5835338fb5 and also the new parameter for vgas: http://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=74914a4b9daa7ce8bb65744f2715ed92b6f34e28 without this patch is impossible disabled emulated vga with hvm domUs (problem found time ago trying nographic xl paramter), the succesive patch fix also nographic parameter.
On Fri, 15 Nov 2013, Fabio Fantoni wrote:> Il 15/11/2013 12:49, Stefano Stabellini ha scritto: > > On Fri, 15 Nov 2013, Fabio Fantoni wrote: > > > Usage: > > > vga="none" > > > > > > With upstream qemu it was impossible to disable emulated vga, > > > even with -nographic qemu parameter setted with nographic xl > > > paramter. > > > > > > Note: > > > Tested only with upstream qemu. With the qemu-trad. it probably > > > needs also the addition of -nographic qemu parameter. > > > Can someone test it with the traditional or should I do it? > > > > > > Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz> > > > --- > > > docs/man/xl.cfg.pod.5 | 2 +- > > > tools/libxl/libxl_create.c | 4 ++++ > > > tools/libxl/libxl_dm.c | 3 +++ > > > tools/libxl/libxl_types.idl | 1 + > > > tools/libxl/xl_cmdimpl.c | 2 ++ > > > 5 files changed, 11 insertions(+), 1 deletion(-) > > > > > > diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5 > > > index 3dedd61..402a414 100644 > > > --- a/docs/man/xl.cfg.pod.5 > > > +++ b/docs/man/xl.cfg.pod.5 > > > @@ -1050,7 +1050,7 @@ This option is deprecated, use vga="stdvga" instead. > > > =item B<vga="STRING"> > > > -Selects the emulated video card (stdvga|cirrus). > > > +Selects the emulated video card (none|stdvga|cirrus). > > > The default is cirrus. > > > =item B<vnc=BOOLEAN> > > > diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c > > > index 2bb33e9..a9735d0 100644 > > > --- a/tools/libxl/libxl_create.c > > > +++ b/tools/libxl/libxl_create.c > > > @@ -222,6 +222,8 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc, > > > switch (b_info->device_model_version) { > > > case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL: > > > switch (b_info->u.hvm.vga.kind) { > > > + case LIBXL_VGA_INTERFACE_TYPE_NONE: > > > + break; > > > case LIBXL_VGA_INTERFACE_TYPE_STD: > > > if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT) > > > b_info->video_memkb = 8 * 1024; > > > @@ -242,6 +244,8 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc, > > > case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN: > > > default: > > > switch (b_info->u.hvm.vga.kind) { > > > + case LIBXL_VGA_INTERFACE_TYPE_NONE: > > > + break; > > > case LIBXL_VGA_INTERFACE_TYPE_STD: > > > if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT) > > > b_info->video_memkb = 16 * 1024; > > > diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c > > > index 7be0a50..086e602 100644 > > > --- a/tools/libxl/libxl_dm.c > > > +++ b/tools/libxl/libxl_dm.c > > > @@ -199,6 +199,7 @@ static char ** > > > libxl__build_device_model_args_old(libxl__gc *gc, > > > flexarray_append(dm_args, "-std-vga"); > > > break; > > > case LIBXL_VGA_INTERFACE_TYPE_CIRRUS: > > > + case LIBXL_VGA_INTERFACE_TYPE_NONE: > > > break; > > > } > > > @@ -498,6 +499,8 @@ static char ** > > > libxl__build_device_model_args_new(libxl__gc *gc, > > > GCSPRINTF("vga.vram_size_mb=%d", > > > libxl__sizekb_to_mb(b_info->video_memkb))); > > > break; > > > + case LIBXL_VGA_INTERFACE_TYPE_NONE: > > > + break; > > > } > > Shouldn''t we be passing -vga none to QEMU instead of nothing at all? > > Is not needed, there is already -nodefaults and -vga is also deprecated and > following the qemu docs: > http://xenbits.xen.org/gitweb/?p=qemu-upstream-unstable.git;a=blob;f=docs/qdev-device-use.txt > the new parameter for replace -vga=none is -nodefaults > the -nodefaults patch is already on git: > http://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=6ef823fdfa701b3659e4161520f43b5835338fb5 > and also the new parameter for vgas: > http://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=74914a4b9daa7ce8bb65744f2715ed92b6f34e28 > without this patch is impossible disabled emulated vga with hvm domUs (problem > found time ago trying nographic xl paramter), the succesive patch fix also > nographic parameter.Ah right, thanks for the detailed explanation. Please test the patch with QEMU traditional too. The upstream QEMU changes are fine by me.