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

Re: [Xen-devel] [PATCH v4] libxl: Add none to vga parameter



On Thu, Mar 13, 2014 at 03:25:47PM +0100, Fabio Fantoni wrote:
> Usage:
>   vga="none"
> 
> Make possible to not have an emulated vga on hvm domUs.
> 
> Signed-off-by: Fabio Fantoni <fabio.fantoni@xxxxxxx>

Reviewed-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>

> ---
> 
> Changes in v4:
> - set video_memkb to 0 only if the default was not changed
> 
> Changes in v3:
> - set video_memkb to 0 if vga is none.
> - remove a check on one condition no more needed.
> 
> Changes in v2:
> - libxl_dm.c:
>  if vga is none, on qemu traditional:
>   - add -vga none parameter.
>   - do not add -videoram parameter.
> ---
>  docs/man/xl.cfg.pod.5       |    2 +-
>  tools/libxl/libxl_create.c  |    8 ++++++++
>  tools/libxl/libxl_dm.c      |    5 +++++
>  tools/libxl/libxl_types.idl |    1 +
>  tools/libxl/xl_cmdimpl.c    |    2 ++
>  5 files changed, 17 insertions(+), 1 deletion(-)
> 
> diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5
> index d5ed82d..a6663b9 100644
> --- a/docs/man/xl.cfg.pod.5
> +++ b/docs/man/xl.cfg.pod.5
> @@ -1096,7 +1096,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 53e7cb6..d015cf4 100644
> --- a/tools/libxl/libxl_create.c
> +++ b/tools/libxl/libxl_create.c
> @@ -226,6 +226,10 @@ 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:
> +                if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT)
> +                    b_info->video_memkb = 0;
> +                break;
>              case LIBXL_VGA_INTERFACE_TYPE_STD:
>                  if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT)
>                      b_info->video_memkb = 8 * 1024;
> @@ -246,6 +250,10 @@ 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:
> +                if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT)
> +                    b_info->video_memkb = 0;
> +                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 5c06dfa..8abed7b 100644
> --- a/tools/libxl/libxl_dm.c
> +++ b/tools/libxl/libxl_dm.c
> @@ -217,6 +217,9 @@ static char ** 
> libxl__build_device_model_args_old(libxl__gc *gc,
>              break;
>          case LIBXL_VGA_INTERFACE_TYPE_CIRRUS:
>              break;
> +        case LIBXL_VGA_INTERFACE_TYPE_NONE:
> +            flexarray_append_pair(dm_args, "-vga", "none");
> +            break;
>          }
>  
>          if (b_info->u.hvm.boot) {
> @@ -510,6 +513,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 7d3a62b..612645c 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 5a92c3b..6b1ebfa 100644
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c
> @@ -1687,6 +1687,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
> 

-- 
Anthony PERARD

_______________________________________________
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®.