xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4] tools/libxl: Improve videoram setting
@ 2013-01-17 13:53 Fabio Fantoni
  2013-01-17 14:08 ` Stefano Stabellini
  0 siblings, 1 reply; 5+ messages in thread
From: Fabio Fantoni @ 2013-01-17 13:53 UTC (permalink / raw)
  To: xen-devel, Ian Campbell, Stefano Stabellini


[-- Attachment #1.1: Type: text/plain, Size: 3156 bytes --]

tools/libxl: Improve videoram setting

- If videoram setting is less than 8 mb shows error and exit.
- Added videoram setting for qemu upstream with cirrus (added in qemu 1.3).
- Updated xl.cfg man.

Signed-off-by: Fabio Fantoni <fabio.fantoni@heliman.it>
---
  docs/man/xl.cfg.pod.5      |   14 +++++---------
  tools/libxl/libxl_create.c |    4 ++++
  tools/libxl/libxl_dm.c     |    6 ++++++
  3 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5
index caba162..9c5cdcd 100644
--- a/docs/man/xl.cfg.pod.5
+++ b/docs/man/xl.cfg.pod.5
@@ -974,19 +974,15 @@ in the B<VFB_SPEC_STRING> for configuring virtual 
frame buffer devices

  Sets the amount of RAM which the emulated video card will contain,
  which in turn limits the resolutions and bit depths which will be
-available. This option is only available when using the B<stdvga>
-option (see below).
+available.
  The default amount of video ram for stdvga is 8MB which is sufficient
-for e.g. 1600x1200 at 32bpp.
+for e.g. 1600x1200 at 32bpp and videoram option is currently working
+only when using the qemu-xen-traditional device-model.

  When using the emulated Cirrus graphics card (B<stdvga=0>)
  the amount of video ram is fixed at 4MB which is sufficient
-for 1024x768 at 32 bpp.
-
-videoram option is currently only available when using the
-qemu-xen-traditional device-model. Upstream qemu-xen device-model
-currently does not support changing the amount of video memory for the
-emulated graphics device.
+for 1024x768 at 32 bpp and videoram option is currently working
+only when using the upstream qemu-xen device-model.

  =item B<stdvga=BOOLEAN>

diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index c6daec9..802209e 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -199,6 +199,10 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc,
              b_info->shadow_memkb = 0;
          if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT)
              b_info->video_memkb = 8 * 1024;
+        else if (b_info->video_memkb < 8192){
+            LIBXL__LOG(CTX, LIBXL__LOG_ERROR,"videoram must be at least 
8 mb");
+            return ERROR_INVAL;
+        }
          if (b_info->u.hvm.timer_mode == LIBXL_TIMER_MODE_DEFAULT)
              b_info->u.hvm.timer_mode =
                  LIBXL_TIMER_MODE_NO_DELAY_FOR_MISSED_TICKS;
diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index c036dc1..d719130 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -430,6 +430,12 @@ static char ** 
libxl__build_device_model_args_new(libxl__gc *gc,
              break;
          case LIBXL_VGA_INTERFACE_TYPE_CIRRUS:
              flexarray_vappend(dm_args, "-vga", "cirrus", NULL);
+            if (b_info->video_memkb) {
+                flexarray_vappend(dm_args, "-global",
+                libxl__sprintf(gc, "vga.vram_size_mb=%d",
+                libxl__sizekb_to_mb(b_info->video_memkb)),
+                NULL);
+            }
              break;
          }

-- 
1.7.9.5


[-- Attachment #1.2: Firma crittografica S/MIME --]
[-- Type: application/pkcs7-signature, Size: 4510 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v4] tools/libxl: Improve videoram setting
  2013-01-17 13:53 [PATCH v4] tools/libxl: Improve videoram setting Fabio Fantoni
@ 2013-01-17 14:08 ` Stefano Stabellini
  2013-01-23 14:24   ` Fabio Fantoni
  2013-01-24 12:01   ` Ian Campbell
  0 siblings, 2 replies; 5+ messages in thread
From: Stefano Stabellini @ 2013-01-17 14:08 UTC (permalink / raw)
  To: Fabio Fantoni; +Cc: xen-devel, Ian Campbell, Stefano Stabellini

On Thu, 17 Jan 2013, Fabio Fantoni wrote:
> tools/libxl: Improve videoram setting
> 
> - If videoram setting is less than 8 mb shows error and exit.
> - Added videoram setting for qemu upstream with cirrus (added in qemu 1.3).
> - Updated xl.cfg man.
> 
> Signed-off-by: Fabio Fantoni <fabio.fantoni@heliman.it>
> ---
>  docs/man/xl.cfg.pod.5      |   14 +++++---------
>  tools/libxl/libxl_create.c |    4 ++++
>  tools/libxl/libxl_dm.c     |    6 ++++++
>  3 files changed, 15 insertions(+), 9 deletions(-)
> 
> diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5
> index caba162..9c5cdcd 100644
> --- a/docs/man/xl.cfg.pod.5
> +++ b/docs/man/xl.cfg.pod.5
> @@ -974,19 +974,15 @@ in the B<VFB_SPEC_STRING> for configuring virtual frame
> buffer devices
> 
>  Sets the amount of RAM which the emulated video card will contain,
>  which in turn limits the resolutions and bit depths which will be
> -available. This option is only available when using the B<stdvga>
> -option (see below).
> +available.
>  The default amount of video ram for stdvga is 8MB which is sufficient
> -for e.g. 1600x1200 at 32bpp.
> +for e.g. 1600x1200 at 32bpp and videoram option is currently working
> +only when using the qemu-xen-traditional device-model.
> 
>  When using the emulated Cirrus graphics card (B<stdvga=0>)
>  the amount of video ram is fixed at 4MB which is sufficient
> -for 1024x768 at 32 bpp.
> -
> -videoram option is currently only available when using the
> -qemu-xen-traditional device-model. Upstream qemu-xen device-model
> -currently does not support changing the amount of video memory for the
> -emulated graphics device.
> +for 1024x768 at 32 bpp and videoram option is currently working
> +only when using the upstream qemu-xen device-model.
> 
>  =item B<stdvga=BOOLEAN>

the patch looks OK to me


> diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
> index c6daec9..802209e 100644
> --- a/tools/libxl/libxl_create.c
> +++ b/tools/libxl/libxl_create.c
> @@ -199,6 +199,10 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc,
>              b_info->shadow_memkb = 0;
>          if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT)
>              b_info->video_memkb = 8 * 1024;
> +        else if (b_info->video_memkb < 8192){
> +            LIBXL__LOG(CTX, LIBXL__LOG_ERROR,"videoram must be at least 8
> mb");
> +            return ERROR_INVAL;
> +        }
>          if (b_info->u.hvm.timer_mode == LIBXL_TIMER_MODE_DEFAULT)
>              b_info->u.hvm.timer_mode =
>                  LIBXL_TIMER_MODE_NO_DELAY_FOR_MISSED_TICKS;
> diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
> index c036dc1..d719130 100644
> --- a/tools/libxl/libxl_dm.c
> +++ b/tools/libxl/libxl_dm.c
> @@ -430,6 +430,12 @@ static char **
> libxl__build_device_model_args_new(libxl__gc *gc,
>              break;
>          case LIBXL_VGA_INTERFACE_TYPE_CIRRUS:
>              flexarray_vappend(dm_args, "-vga", "cirrus", NULL);
> +            if (b_info->video_memkb) {
> +                flexarray_vappend(dm_args, "-global",
> +                libxl__sprintf(gc, "vga.vram_size_mb=%d",
> +                libxl__sizekb_to_mb(b_info->video_memkb)),
> +                NULL);
> +            }
>              break;
>          }
> 
> -- 
> 1.7.9.5
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v4] tools/libxl: Improve videoram setting
  2013-01-17 14:08 ` Stefano Stabellini
@ 2013-01-23 14:24   ` Fabio Fantoni
  2013-01-24 12:01   ` Ian Campbell
  1 sibling, 0 replies; 5+ messages in thread
From: Fabio Fantoni @ 2013-01-23 14:24 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: xen-devel, Ian Campbell


[-- Attachment #1.1: Type: text/plain, Size: 128 bytes --]

Il 17/01/2013 15:08, Stefano Stabellini ha scritto:
> the patch looks OK to me 
If it is ok, can someone apply it, please?


[-- Attachment #1.2: Firma crittografica S/MIME --]
[-- Type: application/pkcs7-signature, Size: 4510 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v4] tools/libxl: Improve videoram setting
  2013-01-17 14:08 ` Stefano Stabellini
  2013-01-23 14:24   ` Fabio Fantoni
@ 2013-01-24 12:01   ` Ian Campbell
  2013-01-28 15:11     ` Fabio Fantoni
  1 sibling, 1 reply; 5+ messages in thread
From: Ian Campbell @ 2013-01-24 12:01 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: xen-devel, Fabio Fantoni

On Thu, 2013-01-17 at 14:08 +0000, Stefano Stabellini wrote:

> >  =item B<stdvga=BOOLEAN>
> 
> the patch looks OK to me

I'd have taken this as an ack and applied but unfortuantely the patch is
whitespace damaged.

Fabio, http://wiki.xen.org/wiki/Submitting_Xen_Patches has some advice
on avoiding this sort of issue, including a link to linux's
email-clients.txt which has handy hints in it.

Ian.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v4] tools/libxl: Improve videoram setting
  2013-01-24 12:01   ` Ian Campbell
@ 2013-01-28 15:11     ` Fabio Fantoni
  0 siblings, 0 replies; 5+ messages in thread
From: Fabio Fantoni @ 2013-01-28 15:11 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel, Stefano Stabellini


[-- Attachment #1.1: Type: text/plain, Size: 891 bytes --]

Il 24/01/2013 13:01, Ian Campbell ha scritto:
> On Thu, 2013-01-17 at 14:08 +0000, Stefano Stabellini wrote:
>
>>>   =item B<stdvga=BOOLEAN>
>> the patch looks OK to me
> I'd have taken this as an ack and applied but unfortuantely the patch is
> whitespace damaged.
>
> Fabio, http://wiki.xen.org/wiki/Submitting_Xen_Patches has some advice
> on avoiding this sort of issue, including a link to linux's
> email-clients.txt which has handy hints in it.
>
> Ian.
>
>
>
>
> -----
> Nessun virus nel messaggio.
> Controllato da AVG - www.avg.com
> Versione: 2013.0.2890 / Database dei virus: 2639/6052 -  Data di rilascio: 23/01/2013
>
>
Thanks for your reply.
I made the patch again based on updated git and I tried to apply the 
modifications on thunderbird following your link.
I resent the patch, see "[PATCH v4 RESEND] tools/libxl: Improve videoram 
setting".


[-- Attachment #1.2: Firma crittografica S/MIME --]
[-- Type: application/pkcs7-signature, Size: 4510 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-01-28 15:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-17 13:53 [PATCH v4] tools/libxl: Improve videoram setting Fabio Fantoni
2013-01-17 14:08 ` Stefano Stabellini
2013-01-23 14:24   ` Fabio Fantoni
2013-01-24 12:01   ` Ian Campbell
2013-01-28 15:11     ` Fabio Fantoni

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).