On 2015/3/20 18:11, Ian Campbell wrote:
On Fri, 2015-03-20 at 18:08 +0800, Chen, Tiejun wrote:
+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(stder
On Fri, 2015-03-20 at 18:08 +0800, Chen, Tiejun wrote:
> +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,
> +"E
+case LIBXL_GFX_PASSTHRU_KIND_DEFAULT:
+LOG(ERROR, "unable to detect required gfx_passthru_kind");
In this case you will now have logged twice. I'd suggest logging only
here and not in the helper.
+default:
And this case is subtly different to LIBXL_GF
On Fri, 2015-03-20 at 09:04 +0800, Chen, Tiejun wrote:
> Refactor again,
>
> diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
> index 8599a6a..05c8916 100644
> --- a/tools/libxl/libxl_dm.c
> +++ b/tools/libxl/libxl_dm.c
> @@ -409,6 +409,23 @@ static char *dm_spice_options(libxl__gc *gc
On 2015/3/19 18:44, Ian Campbell wrote:
On Thu, 2015-03-19 at 10:07 +0800, Chen, Tiejun wrote:
This duplicates the code from above. I think this would be best done as:
static int libxl__detect_gfx_passthru_kind(libxl__gc *gc, guest_config)
{
if (b_info->u.hvm.gfx_passthru_kind != LIBXL_
On Thu, 2015-03-19 at 10:07 +0800, Chen, Tiejun wrote:
> > This duplicates the code from above. I think this would be best done as:
> >
> > static int libxl__detect_gfx_passthru_kind(libxl__gc *gc, guest_config)
> > {
> > if (b_info->u.hvm.gfx_passthru_kind != LIBXL_GFX_PASSTHRU_KIND_DEFAULT)
This duplicates the code from above. I think this would be best done as:
static int libxl__detect_gfx_passthru_kind(libxl__gc *gc, guest_config)
{
if (b_info->u.hvm.gfx_passthru_kind != LIBXL_GFX_PASSTHRU_KIND_DEFAULT)
return 0;
if (libxl__is_igd_vga_passthru(gc, guest_config)
On Wed, 2015-03-18 at 15:32 +0800, Chen, Tiejun wrote:
> > I think the _libxl_ message needs to be just "Unable to detect graphics
> > passthru kind". i.e. it can't/shouldn't reference anything to do with xl
> > config options etc (which would make no sense if libvirt was being
> > used).
> >
> > T
I think the _libxl_ message needs to be just "Unable to detect graphics
passthru kind". i.e. it can't/shouldn't reference anything to do with xl
config options etc (which would make no sense if libvirt was being
used).
That's not very user friendly though, so you may want to consider adding
a new
On Tue, 2015-03-17 at 15:46 +0800, Chen, Tiejun wrote:
> >>> 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
> >>
> >
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_passthr
On Mon, 2015-03-16 at 09:07 +0800, Chen, Tiejun wrote:
> On 2015/3/13 18:11, Ian Campbell wrote:
> > On Fri, 2015-03-13 at 09:39 +0800, Chen, Tiejun wrote:
> >>> I don't think you can abort here, since a user can set
> >>> b_info->u.hvm.gfx_passthru_kind to default. You would need to
> >>> return a
On 2015/3/13 18:11, Ian Campbell wrote:
On Fri, 2015-03-13 at 09:39 +0800, Chen, Tiejun wrote:
I don't think you can abort here, since a user can set
b_info->u.hvm.gfx_passthru_kind to default. You would need to
return an error.
Then, looks I should do this,
LOG(ERROR, "No supported IGD to pa
On Fri, 2015-03-13 at 09:39 +0800, Chen, Tiejun wrote:
> > I don't think you can abort here, since a user can set
> > b_info->u.hvm.gfx_passthru_kind to default. You would need to return an
> > error.
>
> Then, looks I should do this,
>
> LOG(ERROR, "No supported IGD to passt
I don't think you can abort here, since a user can set
b_info->u.hvm.gfx_passthru_kind to default. You would need to return an
error.
Then, looks I should do this,
LOG(ERROR, "No supported IGD to passthru,"
" or please force set gfx_passthru=\"igd\".\
On Thu, 2015-03-12 at 11:18 +0800, Chen, Tiejun wrote:
> >> +
> >> +if (b_info->u.hvm.gfx_passthru_kind ==
> >> +LIBXL_GFX_PASSTHRU_KIND_DEFAULT) {
> >> +if (libxl__is_igd_vga_passthru(gc, guest_config))
> >> +machinearg = GCSPRINTF("%s,igd-passth
+
+if (b_info->u.hvm.gfx_passthru_kind ==
+LIBXL_GFX_PASSTHRU_KIND_DEFAULT) {
+if (libxl__is_igd_vga_passthru(gc, guest_config))
+machinearg = GCSPRINTF("%s,igd-passthru=on", machinearg);
+} else if (b_info->u.hvm.gfx_passthru_kind ==
+
On Tue, 2015-03-10 at 17:42 +0800, Tiejun Chen wrote:
> Although we already have 'gfx_passthru' in b_info, this doesn' suffice
> after we want to handle IGD specifically. Now we define a new field of
> type, gfx_passthru_kind, to indicate we're trying to pass IGD. Actually
> this means we can benef
Although we already have 'gfx_passthru' in b_info, this doesn' suffice
after we want to handle IGD specifically. Now we define a new field of
type, gfx_passthru_kind, to indicate we're trying to pass IGD. Actually
this means we can benefit this to support other specific devices just
by extending gf
19 matches
Mail list logo