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

[Xen-devel] [PATCH] tools/libxl: Added vga parameter for hvm domUs



From: Fabio Fantoni <fabio.fantoni@xxxxxxxxxx>

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@xxxxxxxxxx>
---
 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


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