xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Anthony PERARD <anthony.perard@citrix.com>
To: Fabio Fantoni <fabio.fantoni@m2r.biz>
Cc: xen-devel@lists.xensource.com, Ian.Jackson@eu.citrix.com,
	Ian.Campbell@citrix.com, Stefano.Stabellini@eu.citrix.com
Subject: Re: [PATCH v3 RESEND] libxl: Add none to vga parameter
Date: Thu, 13 Mar 2014 12:21:21 +0000	[thread overview]
Message-ID: <20140313122121.GC4640@perard.uk.xensource.com> (raw)
In-Reply-To: <1393065431-11802-1-git-send-email-fabio.fantoni@m2r.biz>

On Sat, Feb 22, 2014 at 11:37:11AM +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@m2r.biz>

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

Thanks,

> ---
> 
> 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  |    6 ++++++
>  tools/libxl/libxl_dm.c      |    5 +++++
>  tools/libxl/libxl_types.idl |    1 +
>  tools/libxl/xl_cmdimpl.c    |    2 ++
>  5 files changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5
> index e15a49f..2f36143 100644
> --- a/docs/man/xl.cfg.pod.5
> +++ b/docs/man/xl.cfg.pod.5
> @@ -1082,7 +1082,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 a604cd8..9110394 100644
> --- a/tools/libxl/libxl_create.c
> +++ b/tools/libxl/libxl_create.c
> @@ -226,6 +226,9 @@ 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:
> +                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 +249,9 @@ 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:
> +                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 f6f7bbd..761bb61 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) {
> @@ -515,6 +518,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 649ce50..b5a8387 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 4fc46eb..4d720b4 100644
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c
> @@ -1667,6 +1667,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);

-- 
Anthony PERARD

  parent reply	other threads:[~2014-03-13 12:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-13 14:25 [PATCH v4] libxl: Add none to vga parameter Fabio Fantoni
2014-03-13 14:36 ` Paul Durrant
2014-02-22 10:37   ` [PATCH v3 RESEND] " Fabio Fantoni
2014-02-27 14:39     ` Fabio Fantoni
2014-03-10 11:36     ` Ian Jackson
2014-03-10 12:00       ` Fabio Fantoni
2014-03-10 12:06         ` Ian Jackson
2014-03-11 15:09     ` Paul Durrant
2014-03-13 10:57       ` Fabio Fantoni
2014-03-13 12:55         ` Anthony PERARD
2014-03-13 12:21     ` Anthony PERARD [this message]
2014-03-13 18:11       ` [PATCH v3 RESEND] libxl: Add none to vga parameter [and 2 more messages] Ian Jackson
2014-03-13 15:03 ` [PATCH v4] libxl: Add none to vga parameter Anthony PERARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140313122121.GC4640@perard.uk.xensource.com \
    --to=anthony.perard@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=fabio.fantoni@m2r.biz \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).