[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [v3][PATCH 2/2] libxl: introduce gfx_passthru_kind
From: |
Ian Campbell |
Subject: |
Re: [Qemu-devel] [v3][PATCH 2/2] libxl: introduce gfx_passthru_kind |
Date: |
Mon, 30 Mar 2015 10:19:10 +0100 |
On Mon, 2015-03-30 at 09:28 +0800, Chen, Tiejun wrote:
> Sounds it should be a legacy fix to qemu-xen-tranditional :) So lets do
> it now,
>
> @@ -326,6 +326,10 @@ static char **
> libxl__build_device_model_args_old(libxl__gc *gc,
> }
> if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
> flexarray_append(dm_args, "-gfx_passthru");
> + if (b_info->u.hvm.gfx_passthru_kind >
> + LIBXL_GFX_PASSTHRU_KIND_IGD)
> + LOG(ERROR, "unsupported device type for
> \"gfx_passthru\".\n");
> + return NULL;
I'd rather not encode any ordering constraints if we don't have to. I
think this is preferable:
if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
switch (b_info->u.hvm.gfx_passthru_kind) {
case LIBXL_GFX_PASSTHRU_KIND_DEFAULT:
case LIBXL_GFX_PASSTHRU_KIND_IGD:
flexarray_append(dm_args, "-gfx_passthru");
break;
default:
LOG(ERROR, "unsupported gfx_passthru_kind.\n");
return NULL;
}
}
(notice that the error message above doesn't refer to the xl specific
option naming).
Ian.
- Re: [Qemu-devel] One question to lowlevel/xl/xl.c and lowlevel/xc/xc.c, (continued)
Re: [Qemu-devel] [v3][PATCH 2/2] libxl: introduce gfx_passthru_kind, Ian Campbell, 2015/03/24
- Re: [Qemu-devel] [v3][PATCH 2/2] libxl: introduce gfx_passthru_kind, Chen, Tiejun, 2015/03/24
- Re: [Qemu-devel] [v3][PATCH 2/2] libxl: introduce gfx_passthru_kind, Ian Campbell, 2015/03/25
- Re: [Qemu-devel] [v3][PATCH 2/2] libxl: introduce gfx_passthru_kind, Chen, Tiejun, 2015/03/25
- Re: [Qemu-devel] [v3][PATCH 2/2] libxl: introduce gfx_passthru_kind, Ian Campbell, 2015/03/26
- Re: [Qemu-devel] [v3][PATCH 2/2] libxl: introduce gfx_passthru_kind, Chen, Tiejun, 2015/03/26
- Re: [Qemu-devel] [v3][PATCH 2/2] libxl: introduce gfx_passthru_kind, Ian Campbell, 2015/03/27
- Re: [Qemu-devel] [v3][PATCH 2/2] libxl: introduce gfx_passthru_kind, Chen, Tiejun, 2015/03/29
- Re: [Qemu-devel] [v3][PATCH 2/2] libxl: introduce gfx_passthru_kind,
Ian Campbell <=
- Re: [Qemu-devel] [v3][PATCH 2/2] libxl: introduce gfx_passthru_kind, Chen, Tiejun, 2015/03/31