All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools/libxl: Added vga parameter for hvm domUs
@ 2013-02-11 10:57 fantonifabio
  2013-02-15 12:26 ` Stefano Stabellini
  2013-02-15 15:48 ` Ian Jackson
  0 siblings, 2 replies; 8+ messages in thread
From: fantonifabio @ 2013-02-11 10:57 UTC (permalink / raw)
  To: xen-devel; +Cc: Fabio Fantoni, Ian.Campbell, Stefano.Stabellini

From: Fabio Fantoni <fabio.fantoni@heliman.it>

Usage:
  vga="stdvga"|"cirrus"

- Default option is cirrus.
- Prints error and exit if unknown value is passed.
- stdvga parameter is now deprecated.
- Updated xl.cfg man.

Required patch: Improve videoram setting v5
Is prerequisite for patch: Add qxl support v9

Signed-off-by: Fabio Fantoni <fabio.fantoni@heliman.it>
---
 docs/man/xl.cfg.pod.5    |    8 +++++++-
 tools/libxl/xl_cmdimpl.c |   14 +++++++++++++-
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5
index 9c5cdcd..9862842 100644
--- a/docs/man/xl.cfg.pod.5
+++ b/docs/man/xl.cfg.pod.5
@@ -979,7 +979,7 @@ The default amount of video ram for stdvga is 8MB which is sufficient
 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>)
+When using the emulated Cirrus graphics card (B<vga="cirrus">)
 the amount of video ram is fixed at 4MB which is sufficient
 for 1024x768 at 32 bpp and videoram option is currently working
 only when using the upstream qemu-xen device-model.
@@ -991,6 +991,12 @@ emulated graphics device. The default is false which means to emulate
 a Cirrus Logic GD5446 VGA card. If your guest supports VBE 2.0 or
 later (e.g. Windows XP onwards) then you should enable this.
 stdvga supports more video ram and bigger resolutions than Cirrus.
+This option is deprecated, use vga="stdvga" instead.
+
+=item B<vga="STRING">
+
+Selects the emulated video card (stdvga|cirrus).
+The default is cirrus.
 
 =item B<vnc=BOOLEAN>
 
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 080bbd8..f9101ba 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -1469,7 +1469,19 @@ skip_vfb:
 #undef parse_extra_args
 
     if (c_info->type == LIBXL_DOMAIN_TYPE_HVM) {
-        if (!xlu_cfg_get_long(config, "stdvga", &l, 0))
+        if (!xlu_cfg_get_string (config, "vga", &buf, 0)) {
+            if (!strcmp(buf, "stdvga")) {
+                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 {
+                fprintf(stderr,
+                "Unknown vga \"%s\" specified\n", buf);
+                exit(1);
+            }
+        } else if (!xlu_cfg_get_long(config, "stdvga", &l, 0))
             b_info->u.hvm.vga.kind = l ? LIBXL_VGA_INTERFACE_TYPE_STD :
                                          LIBXL_VGA_INTERFACE_TYPE_CIRRUS;
 
-- 
1.7.9.5

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

end of thread, other threads:[~2013-02-18 10:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-11 10:57 [PATCH] tools/libxl: Added vga parameter for hvm domUs fantonifabio
2013-02-15 12:26 ` Stefano Stabellini
2013-02-15 13:45   ` Ian Campbell
2013-02-15 15:48 ` Ian Jackson
2013-02-15 16:00   ` Ian Campbell
2013-02-15 21:54   ` Fabio Fantoni
2013-02-18 10:06     ` Ian Campbell
2013-02-18 10:51       ` Fabio Fantoni

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.