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

Re: [Xen-devel] [v2][PATCH 2/2] libxl: introduce gfx_passthru_kind



If I remember the context correctly this is in the autodetect case,
so I think shouldn't mention IGD. Something like "Unable to detect
graphics passthru kind, please set gfx_passthru_kind. See xl.cfg(5)
for more

s/gfx_passthru_kind/gfx_passthru, right? Because actually we always get
'gfx_passthru_kind' from 'gfx_passthru'.

I think you have it backwards.

In the case here gfx_passthru=1 has been set by the user, but
gfx_passthru_kind=DEFAULT. So libxl has tried to autodetect but it has
failed.

So if the user wants to make progress they should set gfx_passthru_kind
to whatever type of passthrough they were trying to do.

Looks you're saying 'gfx_passthru_kind' shouldn't reply on 'gfx_passthru', so 'gfx_passthru_kind' can override that previous value parsed from 'gfx_passthru', right?


Alternatively I suppose you could recommend removing gfx_passthru=1 (or

I'm still keep that currently.

changing to=0), but given they've set =1 that doesn't seem to be the
most productive suggestion.


So looks the whole policy should be something like this,

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 5c40e84..5518759 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -1953,8 +1953,27 @@ skip_vfb:
         xlu_cfg_replace_string (config, "spice_streaming_video",
                                 &b_info->u.hvm.spice.streaming_video, 0);
xlu_cfg_get_defbool(config, "nographic", &b_info->u.hvm.nographic, 0);
-        xlu_cfg_get_defbool(config, "gfx_passthru",
-                            &b_info->u.hvm.gfx_passthru, 0);
+        if (!xlu_cfg_get_long(config, "gfx_passthru", &l, 1)) {
+            libxl_defbool_set(&b_info->u.hvm.gfx_passthru, l);
+        } else if (!xlu_cfg_get_string(config, "gfx_passthru", &buf, 0)) {
+            if (libxl_gfx_passthru_kind_from_string(buf,
+ &b_info->u.hvm.gfx_passthru_kind)) {
+                fprintf(stderr,
+ "ERROR: invalid value \"%s\" for \"gfx_passthru\"\n",
+                        buf);
+                exit (1);
+            }
+            libxl_defbool_set(&b_info->u.hvm.gfx_passthru, true);
+        }
+        if (!xlu_cfg_get_string(config, "gfx_passthru_kind", &buf, 0)) {
+            if (libxl_gfx_passthru_kind_from_string(buf,
+ &b_info->u.hvm.gfx_passthru_kind)) {
+                fprintf(stderr,
+ "ERROR: invalid value \"%s\" for \"gfx_passthru_kind\"\n",
+                        buf);
+                exit (1);
+            }
+        }
         switch (xlu_cfg_get_list_as_string_list(config, "serial",

&b_info->u.hvm.serial_list,
                                                 1))

Thanks
Tiejun

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