From: Fabio Fantoni <fantonifabio@tiscali.it>
To: xen-devel <xen-devel@lists.xensource.com>
Subject: [PATCH v2] tools/libxl: Improve videoram setting
Date: Thu, 10 Jan 2013 14:01:12 +0100 [thread overview]
Message-ID: <50EEBB98.6060309@tiscali.it> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 2937 bytes --]
tools/libxl: Improve videoram setting
- The minimal videoram setting must be 8 mb.
- 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_dm.c | 6 ++++++
tools/libxl/xl_cmdimpl.c | 3 ++-
3 files changed, 13 insertions(+), 10 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_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;
}
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index e964bf1..2bfbcf4 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -832,7 +832,8 @@ static void parse_config_data(const char *config_source,
xlu_cfg_get_defbool(config, "localtime", &b_info->localtime, 0);
if (!xlu_cfg_get_long (config, "videoram", &l, 0))
- b_info->video_memkb = l * 1024;
+ if ( l > 8 )
+ b_info->video_memkb = l * 1024;
switch(b_info->type) {
case LIBXL_DOMAIN_TYPE_HVM:
--
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
reply other threads:[~2013-01-10 13:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=50EEBB98.6060309@tiscali.it \
--to=fantonifabio@tiscali.it \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.