All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
@ 2015-01-21  7:19 Tiejun Chen
  2015-01-21  7:26 ` Chen, Tiejun
                   ` (3 more replies)
  0 siblings, 4 replies; 40+ messages in thread
From: Tiejun Chen @ 2015-01-21  7:19 UTC (permalink / raw)
  To: ian.jackson, ian.campbell, wei.liu2; +Cc: qemu-devel, kraxel, xen-devel

When we're working to support IGD GFX passthrough with qemu
upstream, instead of "-gfx_passthru" we'd like to make that
a machine option, "-machine xxx,gfx_passthru=on". This need
to bring several changes on tool side.

Signed-off-by: Tiejun Chen <tiejun.chen@intel.com>
---
 tools/libxl/libxl_dm.c | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index c2b0487..2b59d2c 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -318,7 +318,10 @@ static char ** libxl__build_device_model_args_old(libxl__gc *gc,
             flexarray_vappend(dm_args, "-net", "none", NULL);
         }
         if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
-            flexarray_append(dm_args, "-gfx_passthru");
+            if (b_info->device_model_version !=
+                LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) {
+                flexarray_append(dm_args, "-gfx_passthru");
+            }
         }
     } else {
         if (!sdl && !vnc)
@@ -702,7 +705,10 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
             flexarray_append(dm_args, "none");
         }
         if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
-            flexarray_append(dm_args, "-gfx_passthru");
+            if (b_info->device_model_version !=
+                LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) {
+                flexarray_append(dm_args, "-gfx_passthru");
+            }
         }
     } else {
         if (!sdl && !vnc) {
@@ -748,6 +754,15 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
                                             machinearg, max_ram_below_4g);
             }
         }
+
+        if (b_info->device_model_version ==
+            LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) {
+            if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
+                machinearg = libxl__sprintf(gc, "%s,gfx_passthru=on",
+                                            machinearg);
+            }
+        }
+
         flexarray_append(dm_args, machinearg);
         for (i = 0; b_info->extra_hvm && b_info->extra_hvm[i] != NULL; i++)
             flexarray_append(dm_args, b_info->extra_hvm[i]);
-- 
1.9.1

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-21  7:19 [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough Tiejun Chen
  2015-01-21  7:26 ` Chen, Tiejun
@ 2015-01-21  7:26 ` Chen, Tiejun
  2015-01-21 11:37 ` Ian Jackson
  2015-01-21 11:37 ` [Qemu-devel] " Ian Jackson
  3 siblings, 0 replies; 40+ messages in thread
From: Chen, Tiejun @ 2015-01-21  7:26 UTC (permalink / raw)
  To: ian.jackson, ian.campbell, wei.liu2; +Cc: xen-devel, qemu-devel, kraxel

CCed Stefano.

Thanks
Tiejun

On 2015/1/21 15:19, Tiejun Chen wrote:
> When we're working to support IGD GFX passthrough with qemu
> upstream, instead of "-gfx_passthru" we'd like to make that
> a machine option, "-machine xxx,gfx_passthru=on". This need
> to bring several changes on tool side.
>
> Signed-off-by: Tiejun Chen <tiejun.chen@intel.com>
> ---
>   tools/libxl/libxl_dm.c | 19 +++++++++++++++++--
>   1 file changed, 17 insertions(+), 2 deletions(-)
>
> diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
> index c2b0487..2b59d2c 100644
> --- a/tools/libxl/libxl_dm.c
> +++ b/tools/libxl/libxl_dm.c
> @@ -318,7 +318,10 @@ static char ** libxl__build_device_model_args_old(libxl__gc *gc,
>               flexarray_vappend(dm_args, "-net", "none", NULL);
>           }
>           if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
> -            flexarray_append(dm_args, "-gfx_passthru");
> +            if (b_info->device_model_version !=
> +                LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) {
> +                flexarray_append(dm_args, "-gfx_passthru");
> +            }
>           }
>       } else {
>           if (!sdl && !vnc)
> @@ -702,7 +705,10 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
>               flexarray_append(dm_args, "none");
>           }
>           if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
> -            flexarray_append(dm_args, "-gfx_passthru");
> +            if (b_info->device_model_version !=
> +                LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) {
> +                flexarray_append(dm_args, "-gfx_passthru");
> +            }
>           }
>       } else {
>           if (!sdl && !vnc) {
> @@ -748,6 +754,15 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
>                                               machinearg, max_ram_below_4g);
>               }
>           }
> +
> +        if (b_info->device_model_version ==
> +            LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) {
> +            if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
> +                machinearg = libxl__sprintf(gc, "%s,gfx_passthru=on",
> +                                            machinearg);
> +            }
> +        }
> +
>           flexarray_append(dm_args, machinearg);
>           for (i = 0; b_info->extra_hvm && b_info->extra_hvm[i] != NULL; i++)
>               flexarray_append(dm_args, b_info->extra_hvm[i]);
>

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-21  7:19 [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough Tiejun Chen
@ 2015-01-21  7:26 ` Chen, Tiejun
  2015-01-21  7:26 ` Chen, Tiejun
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 40+ messages in thread
From: Chen, Tiejun @ 2015-01-21  7:26 UTC (permalink / raw)
  To: ian.jackson, ian.campbell, wei.liu2; +Cc: xen-devel, qemu-devel, kraxel

CCed Stefano.

Thanks
Tiejun

On 2015/1/21 15:19, Tiejun Chen wrote:
> When we're working to support IGD GFX passthrough with qemu
> upstream, instead of "-gfx_passthru" we'd like to make that
> a machine option, "-machine xxx,gfx_passthru=on". This need
> to bring several changes on tool side.
>
> Signed-off-by: Tiejun Chen <tiejun.chen@intel.com>
> ---
>   tools/libxl/libxl_dm.c | 19 +++++++++++++++++--
>   1 file changed, 17 insertions(+), 2 deletions(-)
>
> diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
> index c2b0487..2b59d2c 100644
> --- a/tools/libxl/libxl_dm.c
> +++ b/tools/libxl/libxl_dm.c
> @@ -318,7 +318,10 @@ static char ** libxl__build_device_model_args_old(libxl__gc *gc,
>               flexarray_vappend(dm_args, "-net", "none", NULL);
>           }
>           if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
> -            flexarray_append(dm_args, "-gfx_passthru");
> +            if (b_info->device_model_version !=
> +                LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) {
> +                flexarray_append(dm_args, "-gfx_passthru");
> +            }
>           }
>       } else {
>           if (!sdl && !vnc)
> @@ -702,7 +705,10 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
>               flexarray_append(dm_args, "none");
>           }
>           if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
> -            flexarray_append(dm_args, "-gfx_passthru");
> +            if (b_info->device_model_version !=
> +                LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) {
> +                flexarray_append(dm_args, "-gfx_passthru");
> +            }
>           }
>       } else {
>           if (!sdl && !vnc) {
> @@ -748,6 +754,15 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
>                                               machinearg, max_ram_below_4g);
>               }
>           }
> +
> +        if (b_info->device_model_version ==
> +            LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) {
> +            if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
> +                machinearg = libxl__sprintf(gc, "%s,gfx_passthru=on",
> +                                            machinearg);
> +            }
> +        }
> +
>           flexarray_append(dm_args, machinearg);
>           for (i = 0; b_info->extra_hvm && b_info->extra_hvm[i] != NULL; i++)
>               flexarray_append(dm_args, b_info->extra_hvm[i]);
>

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-21  7:19 [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough Tiejun Chen
                   ` (2 preceding siblings ...)
  2015-01-21 11:37 ` Ian Jackson
@ 2015-01-21 11:37 ` Ian Jackson
  2015-01-21 11:56   ` Ian Campbell
                     ` (3 more replies)
  3 siblings, 4 replies; 40+ messages in thread
From: Ian Jackson @ 2015-01-21 11:37 UTC (permalink / raw)
  To: Tiejun Chen; +Cc: qemu-devel, xen-devel, wei.liu2, ian.campbell, kraxel

Tiejun Chen writes ("[RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough"):
> When we're working to support IGD GFX passthrough with qemu
> upstream, instead of "-gfx_passthru" we'd like to make that
> a machine option, "-machine xxx,gfx_passthru=on". This need
> to bring several changes on tool side.

Has the corresponding patch to qemu-upstream been accepted yet ?

I'd like to see a confirmation from the qemu side that this is going
into their tree and that the command-line option syntax has been
agreed.

Thanks,
Ian.

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

* Re: [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-21  7:19 [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough Tiejun Chen
  2015-01-21  7:26 ` Chen, Tiejun
  2015-01-21  7:26 ` Chen, Tiejun
@ 2015-01-21 11:37 ` Ian Jackson
  2015-01-21 11:37 ` [Qemu-devel] " Ian Jackson
  3 siblings, 0 replies; 40+ messages in thread
From: Ian Jackson @ 2015-01-21 11:37 UTC (permalink / raw)
  To: Tiejun Chen; +Cc: qemu-devel, xen-devel, wei.liu2, ian.campbell, kraxel

Tiejun Chen writes ("[RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough"):
> When we're working to support IGD GFX passthrough with qemu
> upstream, instead of "-gfx_passthru" we'd like to make that
> a machine option, "-machine xxx,gfx_passthru=on". This need
> to bring several changes on tool side.

Has the corresponding patch to qemu-upstream been accepted yet ?

I'd like to see a confirmation from the qemu side that this is going
into their tree and that the command-line option syntax has been
agreed.

Thanks,
Ian.

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-21 11:37 ` [Qemu-devel] " Ian Jackson
@ 2015-01-21 11:56   ` Ian Campbell
  2015-01-22  0:55     ` Chen, Tiejun
  2015-01-22  0:55     ` Chen, Tiejun
  2015-01-21 11:56   ` Ian Campbell
                     ` (2 subsequent siblings)
  3 siblings, 2 replies; 40+ messages in thread
From: Ian Campbell @ 2015-01-21 11:56 UTC (permalink / raw)
  To: Ian Jackson; +Cc: qemu-devel, Tiejun Chen, wei.liu2, kraxel, xen-devel

On Wed, 2015-01-21 at 11:37 +0000, Ian Jackson wrote:
> Tiejun Chen writes ("[RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough"):
> > When we're working to support IGD GFX passthrough with qemu
> > upstream, instead of "-gfx_passthru" we'd like to make that
> > a machine option, "-machine xxx,gfx_passthru=on". This need
> > to bring several changes on tool side.
> 
> Has the corresponding patch to qemu-upstream been accepted yet ?
> 
> I'd like to see a confirmation from the qemu side that this is going
> into their tree and that the command-line option syntax has been
> agreed.

Do we need to detect old vs. new qemu to know when this option is valid?

Ian.

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

* Re: [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-21 11:37 ` [Qemu-devel] " Ian Jackson
  2015-01-21 11:56   ` Ian Campbell
@ 2015-01-21 11:56   ` Ian Campbell
  2015-01-21 13:48   ` [Qemu-devel] " Gerd Hoffmann
  2015-01-21 13:48   ` Gerd Hoffmann
  3 siblings, 0 replies; 40+ messages in thread
From: Ian Campbell @ 2015-01-21 11:56 UTC (permalink / raw)
  To: Ian Jackson; +Cc: qemu-devel, Tiejun Chen, wei.liu2, kraxel, xen-devel

On Wed, 2015-01-21 at 11:37 +0000, Ian Jackson wrote:
> Tiejun Chen writes ("[RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough"):
> > When we're working to support IGD GFX passthrough with qemu
> > upstream, instead of "-gfx_passthru" we'd like to make that
> > a machine option, "-machine xxx,gfx_passthru=on". This need
> > to bring several changes on tool side.
> 
> Has the corresponding patch to qemu-upstream been accepted yet ?
> 
> I'd like to see a confirmation from the qemu side that this is going
> into their tree and that the command-line option syntax has been
> agreed.

Do we need to detect old vs. new qemu to know when this option is valid?

Ian.

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-21 11:37 ` [Qemu-devel] " Ian Jackson
  2015-01-21 11:56   ` Ian Campbell
  2015-01-21 11:56   ` Ian Campbell
@ 2015-01-21 13:48   ` Gerd Hoffmann
  2015-01-22  0:51     ` Chen, Tiejun
  2015-01-22  0:51     ` [Qemu-devel] " Chen, Tiejun
  2015-01-21 13:48   ` Gerd Hoffmann
  3 siblings, 2 replies; 40+ messages in thread
From: Gerd Hoffmann @ 2015-01-21 13:48 UTC (permalink / raw)
  To: Ian Jackson; +Cc: qemu-devel, Tiejun Chen, wei.liu2, ian.campbell, xen-devel

On Mi, 2015-01-21 at 11:37 +0000, Ian Jackson wrote:
> Tiejun Chen writes ("[RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough"):
> > When we're working to support IGD GFX passthrough with qemu
> > upstream, instead of "-gfx_passthru" we'd like to make that
> > a machine option, "-machine xxx,gfx_passthru=on". This need
> > to bring several changes on tool side.
> 
> Has the corresponding patch to qemu-upstream been accepted yet ?
> 
> I'd like to see a confirmation from the qemu side that this is going
> into their tree and that the command-line option syntax has been
> agreed.

Suggested at patch review, not merged (guess thats why it is tagged
'rfc', to get both qemu+xen on the same page).

While being at it:  Should we name this 'igd-passthru' instead of
'gfx-passthru'?  The hostbridge / isabridge quirks needed are actually
specific to igd and are not needed for -- say -- nvidia gfx cards.

cheers,
  Gerd

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

* Re: [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-21 11:37 ` [Qemu-devel] " Ian Jackson
                     ` (2 preceding siblings ...)
  2015-01-21 13:48   ` [Qemu-devel] " Gerd Hoffmann
@ 2015-01-21 13:48   ` Gerd Hoffmann
  3 siblings, 0 replies; 40+ messages in thread
From: Gerd Hoffmann @ 2015-01-21 13:48 UTC (permalink / raw)
  To: Ian Jackson; +Cc: qemu-devel, Tiejun Chen, wei.liu2, ian.campbell, xen-devel

On Mi, 2015-01-21 at 11:37 +0000, Ian Jackson wrote:
> Tiejun Chen writes ("[RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough"):
> > When we're working to support IGD GFX passthrough with qemu
> > upstream, instead of "-gfx_passthru" we'd like to make that
> > a machine option, "-machine xxx,gfx_passthru=on". This need
> > to bring several changes on tool side.
> 
> Has the corresponding patch to qemu-upstream been accepted yet ?
> 
> I'd like to see a confirmation from the qemu side that this is going
> into their tree and that the command-line option syntax has been
> agreed.

Suggested at patch review, not merged (guess thats why it is tagged
'rfc', to get both qemu+xen on the same page).

While being at it:  Should we name this 'igd-passthru' instead of
'gfx-passthru'?  The hostbridge / isabridge quirks needed are actually
specific to igd and are not needed for -- say -- nvidia gfx cards.

cheers,
  Gerd

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-21 13:48   ` [Qemu-devel] " Gerd Hoffmann
  2015-01-22  0:51     ` Chen, Tiejun
@ 2015-01-22  0:51     ` Chen, Tiejun
  2015-01-23  0:43       ` Chen, Tiejun
  2015-01-23  0:43       ` Chen, Tiejun
  1 sibling, 2 replies; 40+ messages in thread
From: Chen, Tiejun @ 2015-01-22  0:51 UTC (permalink / raw)
  To: Gerd Hoffmann, Ian Jackson, ian.campbell; +Cc: wei.liu2, qemu-devel, xen-devel

On 2015/1/21 21:48, Gerd Hoffmann wrote:
> On Mi, 2015-01-21 at 11:37 +0000, Ian Jackson wrote:
>> Tiejun Chen writes ("[RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough"):
>>> When we're working to support IGD GFX passthrough with qemu
>>> upstream, instead of "-gfx_passthru" we'd like to make that
>>> a machine option, "-machine xxx,gfx_passthru=on". This need
>>> to bring several changes on tool side.
>>
>> Has the corresponding patch to qemu-upstream been accepted yet ?
>>
>> I'd like to see a confirmation from the qemu side that this is going
>> into their tree and that the command-line option syntax has been
>> agreed.
>
> Suggested at patch review, not merged (guess thats why it is tagged
> 'rfc', to get both qemu+xen on the same page).

Yeah, this is exactly what I intended to do here :)

>
> While being at it:  Should we name this 'igd-passthru' instead of
> 'gfx-passthru'?  The hostbridge / isabridge quirks needed are actually
> specific to igd and are not needed for -- say -- nvidia gfx cards.
>

At this point I just concern here if we still use 'gfx_passthrou', at 
least it may look like a backward compatibility with older versions of 
qemu in Xen side, qemu-xen-traditional. But I'd like to follow your 
final option.

Thanks
Tiejun

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

* Re: [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-21 13:48   ` [Qemu-devel] " Gerd Hoffmann
@ 2015-01-22  0:51     ` Chen, Tiejun
  2015-01-22  0:51     ` [Qemu-devel] " Chen, Tiejun
  1 sibling, 0 replies; 40+ messages in thread
From: Chen, Tiejun @ 2015-01-22  0:51 UTC (permalink / raw)
  To: Gerd Hoffmann, Ian Jackson, ian.campbell; +Cc: wei.liu2, qemu-devel, xen-devel

On 2015/1/21 21:48, Gerd Hoffmann wrote:
> On Mi, 2015-01-21 at 11:37 +0000, Ian Jackson wrote:
>> Tiejun Chen writes ("[RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough"):
>>> When we're working to support IGD GFX passthrough with qemu
>>> upstream, instead of "-gfx_passthru" we'd like to make that
>>> a machine option, "-machine xxx,gfx_passthru=on". This need
>>> to bring several changes on tool side.
>>
>> Has the corresponding patch to qemu-upstream been accepted yet ?
>>
>> I'd like to see a confirmation from the qemu side that this is going
>> into their tree and that the command-line option syntax has been
>> agreed.
>
> Suggested at patch review, not merged (guess thats why it is tagged
> 'rfc', to get both qemu+xen on the same page).

Yeah, this is exactly what I intended to do here :)

>
> While being at it:  Should we name this 'igd-passthru' instead of
> 'gfx-passthru'?  The hostbridge / isabridge quirks needed are actually
> specific to igd and are not needed for -- say -- nvidia gfx cards.
>

At this point I just concern here if we still use 'gfx_passthrou', at 
least it may look like a backward compatibility with older versions of 
qemu in Xen side, qemu-xen-traditional. But I'd like to follow your 
final option.

Thanks
Tiejun

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-21 11:56   ` Ian Campbell
@ 2015-01-22  0:55     ` Chen, Tiejun
  2015-01-22  0:55     ` Chen, Tiejun
  1 sibling, 0 replies; 40+ messages in thread
From: Chen, Tiejun @ 2015-01-22  0:55 UTC (permalink / raw)
  To: Ian Campbell, Ian Jackson; +Cc: qemu-devel, wei.liu2, kraxel, xen-devel

On 2015/1/21 19:56, Ian Campbell wrote:
> On Wed, 2015-01-21 at 11:37 +0000, Ian Jackson wrote:
>> Tiejun Chen writes ("[RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough"):
>>> When we're working to support IGD GFX passthrough with qemu
>>> upstream, instead of "-gfx_passthru" we'd like to make that
>>> a machine option, "-machine xxx,gfx_passthru=on". This need
>>> to bring several changes on tool side.
>>
>> Has the corresponding patch to qemu-upstream been accepted yet ?
>>
>> I'd like to see a confirmation from the qemu side that this is going
>> into their tree and that the command-line option syntax has been
>> agreed.
>
> Do we need to detect old vs. new qemu to know when this option is valid?

Do you mean we should introduce these two options into qemu upstream at 
the same time? Here I just keep that new option, and that old is gone.

Thanks
Tiejun

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

* Re: [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-21 11:56   ` Ian Campbell
  2015-01-22  0:55     ` Chen, Tiejun
@ 2015-01-22  0:55     ` Chen, Tiejun
  1 sibling, 0 replies; 40+ messages in thread
From: Chen, Tiejun @ 2015-01-22  0:55 UTC (permalink / raw)
  To: Ian Campbell, Ian Jackson; +Cc: qemu-devel, wei.liu2, kraxel, xen-devel

On 2015/1/21 19:56, Ian Campbell wrote:
> On Wed, 2015-01-21 at 11:37 +0000, Ian Jackson wrote:
>> Tiejun Chen writes ("[RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough"):
>>> When we're working to support IGD GFX passthrough with qemu
>>> upstream, instead of "-gfx_passthru" we'd like to make that
>>> a machine option, "-machine xxx,gfx_passthru=on". This need
>>> to bring several changes on tool side.
>>
>> Has the corresponding patch to qemu-upstream been accepted yet ?
>>
>> I'd like to see a confirmation from the qemu side that this is going
>> into their tree and that the command-line option syntax has been
>> agreed.
>
> Do we need to detect old vs. new qemu to know when this option is valid?

Do you mean we should introduce these two options into qemu upstream at 
the same time? Here I just keep that new option, and that old is gone.

Thanks
Tiejun

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-22  0:51     ` [Qemu-devel] " Chen, Tiejun
@ 2015-01-23  0:43       ` Chen, Tiejun
  2015-01-26  0:44         ` Chen, Tiejun
  2015-01-26  0:44         ` Chen, Tiejun
  2015-01-23  0:43       ` Chen, Tiejun
  1 sibling, 2 replies; 40+ messages in thread
From: Chen, Tiejun @ 2015-01-23  0:43 UTC (permalink / raw)
  To: Gerd Hoffmann, Ian Jackson, ian.campbell; +Cc: wei.liu2, qemu-devel, xen-devel

On 2015/1/22 8:51, Chen, Tiejun wrote:
> On 2015/1/21 21:48, Gerd Hoffmann wrote:
>> On Mi, 2015-01-21 at 11:37 +0000, Ian Jackson wrote:
>>> Tiejun Chen writes ("[RFC][PATCH 1/1] libxl: add one machine property
>>> to support IGD GFX passthrough"):
>>>> When we're working to support IGD GFX passthrough with qemu
>>>> upstream, instead of "-gfx_passthru" we'd like to make that
>>>> a machine option, "-machine xxx,gfx_passthru=on". This need
>>>> to bring several changes on tool side.
>>>
>>> Has the corresponding patch to qemu-upstream been accepted yet ?
>>>
>>> I'd like to see a confirmation from the qemu side that this is going
>>> into their tree and that the command-line option syntax has been
>>> agreed.
>>
>> Suggested at patch review, not merged (guess thats why it is tagged
>> 'rfc', to get both qemu+xen on the same page).
>
> Yeah, this is exactly what I intended to do here :)
>
>>
>> While being at it:  Should we name this 'igd-passthru' instead of
>> 'gfx-passthru'?  The hostbridge / isabridge quirks needed are actually
>> specific to igd and are not needed for -- say -- nvidia gfx cards.
>>
>
> At this point I just concern here if we still use 'gfx_passthrou', at
> least it may look like a backward compatibility with older versions of
> qemu in Xen side, qemu-xen-traditional. But I'd like to follow your
> final option.
>

Any feedback to this option I should follow here?

Thanks
Tiejun

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-22  0:51     ` [Qemu-devel] " Chen, Tiejun
  2015-01-23  0:43       ` Chen, Tiejun
@ 2015-01-23  0:43       ` Chen, Tiejun
  1 sibling, 0 replies; 40+ messages in thread
From: Chen, Tiejun @ 2015-01-23  0:43 UTC (permalink / raw)
  To: Gerd Hoffmann, Ian Jackson, ian.campbell; +Cc: wei.liu2, qemu-devel, xen-devel

On 2015/1/22 8:51, Chen, Tiejun wrote:
> On 2015/1/21 21:48, Gerd Hoffmann wrote:
>> On Mi, 2015-01-21 at 11:37 +0000, Ian Jackson wrote:
>>> Tiejun Chen writes ("[RFC][PATCH 1/1] libxl: add one machine property
>>> to support IGD GFX passthrough"):
>>>> When we're working to support IGD GFX passthrough with qemu
>>>> upstream, instead of "-gfx_passthru" we'd like to make that
>>>> a machine option, "-machine xxx,gfx_passthru=on". This need
>>>> to bring several changes on tool side.
>>>
>>> Has the corresponding patch to qemu-upstream been accepted yet ?
>>>
>>> I'd like to see a confirmation from the qemu side that this is going
>>> into their tree and that the command-line option syntax has been
>>> agreed.
>>
>> Suggested at patch review, not merged (guess thats why it is tagged
>> 'rfc', to get both qemu+xen on the same page).
>
> Yeah, this is exactly what I intended to do here :)
>
>>
>> While being at it:  Should we name this 'igd-passthru' instead of
>> 'gfx-passthru'?  The hostbridge / isabridge quirks needed are actually
>> specific to igd and are not needed for -- say -- nvidia gfx cards.
>>
>
> At this point I just concern here if we still use 'gfx_passthrou', at
> least it may look like a backward compatibility with older versions of
> qemu in Xen side, qemu-xen-traditional. But I'd like to follow your
> final option.
>

Any feedback to this option I should follow here?

Thanks
Tiejun

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-23  0:43       ` Chen, Tiejun
  2015-01-26  0:44         ` Chen, Tiejun
@ 2015-01-26  0:44         ` Chen, Tiejun
  2015-01-27 14:40           ` Ian Jackson
  2015-01-27 14:40           ` Ian Jackson
  1 sibling, 2 replies; 40+ messages in thread
From: Chen, Tiejun @ 2015-01-26  0:44 UTC (permalink / raw)
  To: Gerd Hoffmann, Ian Jackson, ian.campbell; +Cc: wei.liu2, qemu-devel, xen-devel

On 2015/1/23 8:43, Chen, Tiejun wrote:
> On 2015/1/22 8:51, Chen, Tiejun wrote:
>> On 2015/1/21 21:48, Gerd Hoffmann wrote:
>>> On Mi, 2015-01-21 at 11:37 +0000, Ian Jackson wrote:
>>>> Tiejun Chen writes ("[RFC][PATCH 1/1] libxl: add one machine property
>>>> to support IGD GFX passthrough"):
>>>>> When we're working to support IGD GFX passthrough with qemu
>>>>> upstream, instead of "-gfx_passthru" we'd like to make that
>>>>> a machine option, "-machine xxx,gfx_passthru=on". This need
>>>>> to bring several changes on tool side.
>>>>
>>>> Has the corresponding patch to qemu-upstream been accepted yet ?
>>>>
>>>> I'd like to see a confirmation from the qemu side that this is going
>>>> into their tree and that the command-line option syntax has been
>>>> agreed.
>>>
>>> Suggested at patch review, not merged (guess thats why it is tagged
>>> 'rfc', to get both qemu+xen on the same page).
>>
>> Yeah, this is exactly what I intended to do here :)
>>
>>>
>>> While being at it:  Should we name this 'igd-passthru' instead of
>>> 'gfx-passthru'?  The hostbridge / isabridge quirks needed are actually
>>> specific to igd and are not needed for -- say -- nvidia gfx cards.
>>>
>>
>> At this point I just concern here if we still use 'gfx_passthrou', at
>> least it may look like a backward compatibility with older versions of
>> qemu in Xen side, qemu-xen-traditional. But I'd like to follow your
>> final option.
>>
>
> Any feedback to this option I should follow here?
>

Ping...

Thanks
Tiejun

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-23  0:43       ` Chen, Tiejun
@ 2015-01-26  0:44         ` Chen, Tiejun
  2015-01-26  0:44         ` Chen, Tiejun
  1 sibling, 0 replies; 40+ messages in thread
From: Chen, Tiejun @ 2015-01-26  0:44 UTC (permalink / raw)
  To: Gerd Hoffmann, Ian Jackson, ian.campbell; +Cc: wei.liu2, qemu-devel, xen-devel

On 2015/1/23 8:43, Chen, Tiejun wrote:
> On 2015/1/22 8:51, Chen, Tiejun wrote:
>> On 2015/1/21 21:48, Gerd Hoffmann wrote:
>>> On Mi, 2015-01-21 at 11:37 +0000, Ian Jackson wrote:
>>>> Tiejun Chen writes ("[RFC][PATCH 1/1] libxl: add one machine property
>>>> to support IGD GFX passthrough"):
>>>>> When we're working to support IGD GFX passthrough with qemu
>>>>> upstream, instead of "-gfx_passthru" we'd like to make that
>>>>> a machine option, "-machine xxx,gfx_passthru=on". This need
>>>>> to bring several changes on tool side.
>>>>
>>>> Has the corresponding patch to qemu-upstream been accepted yet ?
>>>>
>>>> I'd like to see a confirmation from the qemu side that this is going
>>>> into their tree and that the command-line option syntax has been
>>>> agreed.
>>>
>>> Suggested at patch review, not merged (guess thats why it is tagged
>>> 'rfc', to get both qemu+xen on the same page).
>>
>> Yeah, this is exactly what I intended to do here :)
>>
>>>
>>> While being at it:  Should we name this 'igd-passthru' instead of
>>> 'gfx-passthru'?  The hostbridge / isabridge quirks needed are actually
>>> specific to igd and are not needed for -- say -- nvidia gfx cards.
>>>
>>
>> At this point I just concern here if we still use 'gfx_passthrou', at
>> least it may look like a backward compatibility with older versions of
>> qemu in Xen side, qemu-xen-traditional. But I'd like to follow your
>> final option.
>>
>
> Any feedback to this option I should follow here?
>

Ping...

Thanks
Tiejun

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-26  0:44         ` Chen, Tiejun
@ 2015-01-27 14:40           ` Ian Jackson
  2015-01-28  0:42             ` Chen, Tiejun
  2015-01-28  0:42             ` Chen, Tiejun
  2015-01-27 14:40           ` Ian Jackson
  1 sibling, 2 replies; 40+ messages in thread
From: Ian Jackson @ 2015-01-27 14:40 UTC (permalink / raw)
  To: Chen, Tiejun; +Cc: qemu-devel, xen-devel, wei.liu2, Gerd Hoffmann, ian.campbell

Chen, Tiejun writes ("Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough"):
> On 2015/1/23 8:43, Chen, Tiejun wrote:
> > On 2015/1/22 8:51, Chen, Tiejun wrote:
> >> At this point I just concern here if we still use 'gfx_passthrou', at
> >> least it may look like a backward compatibility with older versions of
> >> qemu in Xen side, qemu-xen-traditional. But I'd like to follow your
> >> final option.
...
> > Any feedback to this option I should follow here?
> 
> Ping...

I think this is a question that qemu upstream should answer.

Thanks,
Ian.

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-26  0:44         ` Chen, Tiejun
  2015-01-27 14:40           ` Ian Jackson
@ 2015-01-27 14:40           ` Ian Jackson
  1 sibling, 0 replies; 40+ messages in thread
From: Ian Jackson @ 2015-01-27 14:40 UTC (permalink / raw)
  To: Chen, Tiejun; +Cc: qemu-devel, xen-devel, wei.liu2, Gerd Hoffmann, ian.campbell

Chen, Tiejun writes ("Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough"):
> On 2015/1/23 8:43, Chen, Tiejun wrote:
> > On 2015/1/22 8:51, Chen, Tiejun wrote:
> >> At this point I just concern here if we still use 'gfx_passthrou', at
> >> least it may look like a backward compatibility with older versions of
> >> qemu in Xen side, qemu-xen-traditional. But I'd like to follow your
> >> final option.
...
> > Any feedback to this option I should follow here?
> 
> Ping...

I think this is a question that qemu upstream should answer.

Thanks,
Ian.

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-27 14:40           ` Ian Jackson
  2015-01-28  0:42             ` Chen, Tiejun
@ 2015-01-28  0:42             ` Chen, Tiejun
  2015-01-28 11:12               ` Wei Liu
  2015-01-28 11:12               ` Wei Liu
  1 sibling, 2 replies; 40+ messages in thread
From: Chen, Tiejun @ 2015-01-28  0:42 UTC (permalink / raw)
  To: Ian Jackson, Gerd Hoffmann; +Cc: xen-devel, wei.liu2, ian.campbell, qemu-devel

On 2015/1/27 22:40, Ian Jackson wrote:
> Chen, Tiejun writes ("Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough"):
>> On 2015/1/23 8:43, Chen, Tiejun wrote:
>>> On 2015/1/22 8:51, Chen, Tiejun wrote:
>>>> At this point I just concern here if we still use 'gfx_passthrou', at
>>>> least it may look like a backward compatibility with older versions of
>>>> qemu in Xen side, qemu-xen-traditional. But I'd like to follow your
>>>> final option.
> ...
>>> Any feedback to this option I should follow here?
>>
>> Ping...
>
> I think this is a question that qemu upstream should answer.
>

Actually this is just commented by Gerd in qemu upstream. So now looks 
in Xen side you guys don't have any objection to use 'igd-passthru' as 
well. If yes, I'm fine to adopt this.

Thanks
Tiejun

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-27 14:40           ` Ian Jackson
@ 2015-01-28  0:42             ` Chen, Tiejun
  2015-01-28  0:42             ` Chen, Tiejun
  1 sibling, 0 replies; 40+ messages in thread
From: Chen, Tiejun @ 2015-01-28  0:42 UTC (permalink / raw)
  To: Ian Jackson, Gerd Hoffmann; +Cc: xen-devel, wei.liu2, ian.campbell, qemu-devel

On 2015/1/27 22:40, Ian Jackson wrote:
> Chen, Tiejun writes ("Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough"):
>> On 2015/1/23 8:43, Chen, Tiejun wrote:
>>> On 2015/1/22 8:51, Chen, Tiejun wrote:
>>>> At this point I just concern here if we still use 'gfx_passthrou', at
>>>> least it may look like a backward compatibility with older versions of
>>>> qemu in Xen side, qemu-xen-traditional. But I'd like to follow your
>>>> final option.
> ...
>>> Any feedback to this option I should follow here?
>>
>> Ping...
>
> I think this is a question that qemu upstream should answer.
>

Actually this is just commented by Gerd in qemu upstream. So now looks 
in Xen side you guys don't have any objection to use 'igd-passthru' as 
well. If yes, I'm fine to adopt this.

Thanks
Tiejun

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-28  0:42             ` Chen, Tiejun
  2015-01-28 11:12               ` Wei Liu
@ 2015-01-28 11:12               ` Wei Liu
  2015-01-29  0:41                 ` Chen, Tiejun
  2015-01-29  0:41                 ` Chen, Tiejun
  1 sibling, 2 replies; 40+ messages in thread
From: Wei Liu @ 2015-01-28 11:12 UTC (permalink / raw)
  To: Chen, Tiejun
  Cc: wei.liu2, ian.campbell, Ian Jackson, qemu-devel, xen-devel,
	Gerd Hoffmann

On Wed, Jan 28, 2015 at 08:42:56AM +0800, Chen, Tiejun wrote:
> On 2015/1/27 22:40, Ian Jackson wrote:
> >Chen, Tiejun writes ("Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough"):
> >>On 2015/1/23 8:43, Chen, Tiejun wrote:
> >>>On 2015/1/22 8:51, Chen, Tiejun wrote:
> >>>>At this point I just concern here if we still use 'gfx_passthrou', at
> >>>>least it may look like a backward compatibility with older versions of
> >>>>qemu in Xen side, qemu-xen-traditional. But I'd like to follow your
> >>>>final option.
> >...
> >>>Any feedback to this option I should follow here?
> >>
> >>Ping...
> >
> >I think this is a question that qemu upstream should answer.
> >
> 
> Actually this is just commented by Gerd in qemu upstream. So now looks in
> Xen side you guys don't have any objection to use 'igd-passthru' as well. If
> yes, I'm fine to adopt this.
> 

Yes, we would like to stay in line with upstream.

Just remember to handle old option in libxl if your old option is already
released by some older version of QEMUs.

Wei.

> Thanks
> Tiejun
> 

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-28  0:42             ` Chen, Tiejun
@ 2015-01-28 11:12               ` Wei Liu
  2015-01-28 11:12               ` Wei Liu
  1 sibling, 0 replies; 40+ messages in thread
From: Wei Liu @ 2015-01-28 11:12 UTC (permalink / raw)
  To: Chen, Tiejun
  Cc: wei.liu2, ian.campbell, Ian Jackson, qemu-devel, xen-devel,
	Gerd Hoffmann

On Wed, Jan 28, 2015 at 08:42:56AM +0800, Chen, Tiejun wrote:
> On 2015/1/27 22:40, Ian Jackson wrote:
> >Chen, Tiejun writes ("Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough"):
> >>On 2015/1/23 8:43, Chen, Tiejun wrote:
> >>>On 2015/1/22 8:51, Chen, Tiejun wrote:
> >>>>At this point I just concern here if we still use 'gfx_passthrou', at
> >>>>least it may look like a backward compatibility with older versions of
> >>>>qemu in Xen side, qemu-xen-traditional. But I'd like to follow your
> >>>>final option.
> >...
> >>>Any feedback to this option I should follow here?
> >>
> >>Ping...
> >
> >I think this is a question that qemu upstream should answer.
> >
> 
> Actually this is just commented by Gerd in qemu upstream. So now looks in
> Xen side you guys don't have any objection to use 'igd-passthru' as well. If
> yes, I'm fine to adopt this.
> 

Yes, we would like to stay in line with upstream.

Just remember to handle old option in libxl if your old option is already
released by some older version of QEMUs.

Wei.

> Thanks
> Tiejun
> 

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-28 11:12               ` Wei Liu
@ 2015-01-29  0:41                 ` Chen, Tiejun
  2015-01-29 10:50                   ` Wei Liu
  2015-01-29 10:50                   ` Wei Liu
  2015-01-29  0:41                 ` Chen, Tiejun
  1 sibling, 2 replies; 40+ messages in thread
From: Chen, Tiejun @ 2015-01-29  0:41 UTC (permalink / raw)
  To: Wei Liu; +Cc: qemu-devel, xen-devel, Ian Jackson, Gerd Hoffmann, ian.campbell

On 2015/1/28 19:12, Wei Liu wrote:
> On Wed, Jan 28, 2015 at 08:42:56AM +0800, Chen, Tiejun wrote:
>> On 2015/1/27 22:40, Ian Jackson wrote:
>>> Chen, Tiejun writes ("Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough"):
>>>> On 2015/1/23 8:43, Chen, Tiejun wrote:
>>>>> On 2015/1/22 8:51, Chen, Tiejun wrote:
>>>>>> At this point I just concern here if we still use 'gfx_passthrou', at
>>>>>> least it may look like a backward compatibility with older versions of
>>>>>> qemu in Xen side, qemu-xen-traditional. But I'd like to follow your
>>>>>> final option.
>>> ...
>>>>> Any feedback to this option I should follow here?
>>>>
>>>> Ping...
>>>
>>> I think this is a question that qemu upstream should answer.
>>>
>>
>> Actually this is just commented by Gerd in qemu upstream. So now looks in
>> Xen side you guys don't have any objection to use 'igd-passthru' as well. If
>> yes, I'm fine to adopt this.
>>
>
> Yes, we would like to stay in line with upstream.

Wei,

Thanks for your response.

>
> Just remember to handle old option in libxl if your old option is already
> released by some older version of QEMUs.

I just drop that old option, -gfx_passthru, if we're under qemu upstream 
circumstance, like this,

--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -318,7 +318,10 @@ static char ** 
libxl__build_device_model_args_old(libxl__gc *gc,
              flexarray_vappend(dm_args, "-net", "none", NULL);
          }
          if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
-            flexarray_append(dm_args, "-gfx_passthru");
+            if (b_info->device_model_version !=
+                LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) {
+                flexarray_append(dm_args, "-gfx_passthru");
+            }
          }
      } else {
          if (!sdl && !vnc)
@@ -702,7 +705,10 @@ static char ** 
libxl__build_device_model_args_new(libxl__gc *gc,
              flexarray_append(dm_args, "none");
          }
          if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
-            flexarray_append(dm_args, "-gfx_passthru");
+            if (b_info->device_model_version !=
+                LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) {
+                flexarray_append(dm_args, "-gfx_passthru");
+            }
          }
      } else {
          if (!sdl && !vnc) {

Is this good enough?

Thanks
Tiejun

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-28 11:12               ` Wei Liu
  2015-01-29  0:41                 ` Chen, Tiejun
@ 2015-01-29  0:41                 ` Chen, Tiejun
  1 sibling, 0 replies; 40+ messages in thread
From: Chen, Tiejun @ 2015-01-29  0:41 UTC (permalink / raw)
  To: Wei Liu; +Cc: qemu-devel, xen-devel, Ian Jackson, Gerd Hoffmann, ian.campbell

On 2015/1/28 19:12, Wei Liu wrote:
> On Wed, Jan 28, 2015 at 08:42:56AM +0800, Chen, Tiejun wrote:
>> On 2015/1/27 22:40, Ian Jackson wrote:
>>> Chen, Tiejun writes ("Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough"):
>>>> On 2015/1/23 8:43, Chen, Tiejun wrote:
>>>>> On 2015/1/22 8:51, Chen, Tiejun wrote:
>>>>>> At this point I just concern here if we still use 'gfx_passthrou', at
>>>>>> least it may look like a backward compatibility with older versions of
>>>>>> qemu in Xen side, qemu-xen-traditional. But I'd like to follow your
>>>>>> final option.
>>> ...
>>>>> Any feedback to this option I should follow here?
>>>>
>>>> Ping...
>>>
>>> I think this is a question that qemu upstream should answer.
>>>
>>
>> Actually this is just commented by Gerd in qemu upstream. So now looks in
>> Xen side you guys don't have any objection to use 'igd-passthru' as well. If
>> yes, I'm fine to adopt this.
>>
>
> Yes, we would like to stay in line with upstream.

Wei,

Thanks for your response.

>
> Just remember to handle old option in libxl if your old option is already
> released by some older version of QEMUs.

I just drop that old option, -gfx_passthru, if we're under qemu upstream 
circumstance, like this,

--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -318,7 +318,10 @@ static char ** 
libxl__build_device_model_args_old(libxl__gc *gc,
              flexarray_vappend(dm_args, "-net", "none", NULL);
          }
          if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
-            flexarray_append(dm_args, "-gfx_passthru");
+            if (b_info->device_model_version !=
+                LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) {
+                flexarray_append(dm_args, "-gfx_passthru");
+            }
          }
      } else {
          if (!sdl && !vnc)
@@ -702,7 +705,10 @@ static char ** 
libxl__build_device_model_args_new(libxl__gc *gc,
              flexarray_append(dm_args, "none");
          }
          if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
-            flexarray_append(dm_args, "-gfx_passthru");
+            if (b_info->device_model_version !=
+                LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) {
+                flexarray_append(dm_args, "-gfx_passthru");
+            }
          }
      } else {
          if (!sdl && !vnc) {

Is this good enough?

Thanks
Tiejun

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-29  0:41                 ` Chen, Tiejun
@ 2015-01-29 10:50                   ` Wei Liu
  2015-01-30  0:56                     ` Chen, Tiejun
  2015-01-30  0:56                     ` Chen, Tiejun
  2015-01-29 10:50                   ` Wei Liu
  1 sibling, 2 replies; 40+ messages in thread
From: Wei Liu @ 2015-01-29 10:50 UTC (permalink / raw)
  To: Chen, Tiejun
  Cc: Wei Liu, ian.campbell, Ian Jackson, qemu-devel, xen-devel, Gerd Hoffmann

On Thu, Jan 29, 2015 at 08:41:24AM +0800, Chen, Tiejun wrote:
> On 2015/1/28 19:12, Wei Liu wrote:
> >On Wed, Jan 28, 2015 at 08:42:56AM +0800, Chen, Tiejun wrote:
> >>On 2015/1/27 22:40, Ian Jackson wrote:
> >>>Chen, Tiejun writes ("Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough"):
> >>>>On 2015/1/23 8:43, Chen, Tiejun wrote:
> >>>>>On 2015/1/22 8:51, Chen, Tiejun wrote:
> >>>>>>At this point I just concern here if we still use 'gfx_passthrou', at
> >>>>>>least it may look like a backward compatibility with older versions of
> >>>>>>qemu in Xen side, qemu-xen-traditional. But I'd like to follow your
> >>>>>>final option.
> >>>...
> >>>>>Any feedback to this option I should follow here?
> >>>>
> >>>>Ping...
> >>>
> >>>I think this is a question that qemu upstream should answer.
> >>>
> >>
> >>Actually this is just commented by Gerd in qemu upstream. So now looks in
> >>Xen side you guys don't have any objection to use 'igd-passthru' as well. If
> >>yes, I'm fine to adopt this.
> >>
> >
> >Yes, we would like to stay in line with upstream.
> 
> Wei,
> 
> Thanks for your response.
> 
> >
> >Just remember to handle old option in libxl if your old option is already
> >released by some older version of QEMUs.
> 
> I just drop that old option, -gfx_passthru, if we're under qemu upstream
> circumstance, like this,
> 

The question is, is there any version of qemu upstream that has
been released that has the old option (-gfx-passthru)?

This gives us a situation that we need to support both the old
(-gfx-passthru) and new (-igd-passthru) options. Presumably we (libxl)
would need to fork a qemu process to determine which option it has and
pass the right one.

Or you can try to keep both old and new option at the same time but
deprecate the old one. Then in a few qemu release cycles later (or
probably one year or two?) you can finally remove the old one. The point
is that to give downstream (in this case, Xen) time to cope with the
change.

> --- a/tools/libxl/libxl_dm.c
> +++ b/tools/libxl/libxl_dm.c
> @@ -318,7 +318,10 @@ static char **
> libxl__build_device_model_args_old(libxl__gc *gc,
>              flexarray_vappend(dm_args, "-net", "none", NULL);
>          }
>          if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
> -            flexarray_append(dm_args, "-gfx_passthru");
> +            if (b_info->device_model_version !=
> +                LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) {
> +                flexarray_append(dm_args, "-gfx_passthru");
> +            }

I don't think this is right if upstream qemu also supports gfx-passthru.

However, you're modifying libxl__build_device_model_args_old, it
strongly suggests that it only affects qemu-trad. That means you don't
even need this patch...

Wei.

>          }
>      } else {
>          if (!sdl && !vnc)
> @@ -702,7 +705,10 @@ static char **
> libxl__build_device_model_args_new(libxl__gc *gc,
>              flexarray_append(dm_args, "none");
>          }
>          if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
> -            flexarray_append(dm_args, "-gfx_passthru");
> +            if (b_info->device_model_version !=
> +                LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) {
> +                flexarray_append(dm_args, "-gfx_passthru");
> +            }
>          }
>      } else {
>          if (!sdl && !vnc) {
> 
> Is this good enough?
> 
> Thanks
> Tiejun

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-29  0:41                 ` Chen, Tiejun
  2015-01-29 10:50                   ` Wei Liu
@ 2015-01-29 10:50                   ` Wei Liu
  1 sibling, 0 replies; 40+ messages in thread
From: Wei Liu @ 2015-01-29 10:50 UTC (permalink / raw)
  To: Chen, Tiejun
  Cc: Wei Liu, ian.campbell, Ian Jackson, qemu-devel, xen-devel, Gerd Hoffmann

On Thu, Jan 29, 2015 at 08:41:24AM +0800, Chen, Tiejun wrote:
> On 2015/1/28 19:12, Wei Liu wrote:
> >On Wed, Jan 28, 2015 at 08:42:56AM +0800, Chen, Tiejun wrote:
> >>On 2015/1/27 22:40, Ian Jackson wrote:
> >>>Chen, Tiejun writes ("Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough"):
> >>>>On 2015/1/23 8:43, Chen, Tiejun wrote:
> >>>>>On 2015/1/22 8:51, Chen, Tiejun wrote:
> >>>>>>At this point I just concern here if we still use 'gfx_passthrou', at
> >>>>>>least it may look like a backward compatibility with older versions of
> >>>>>>qemu in Xen side, qemu-xen-traditional. But I'd like to follow your
> >>>>>>final option.
> >>>...
> >>>>>Any feedback to this option I should follow here?
> >>>>
> >>>>Ping...
> >>>
> >>>I think this is a question that qemu upstream should answer.
> >>>
> >>
> >>Actually this is just commented by Gerd in qemu upstream. So now looks in
> >>Xen side you guys don't have any objection to use 'igd-passthru' as well. If
> >>yes, I'm fine to adopt this.
> >>
> >
> >Yes, we would like to stay in line with upstream.
> 
> Wei,
> 
> Thanks for your response.
> 
> >
> >Just remember to handle old option in libxl if your old option is already
> >released by some older version of QEMUs.
> 
> I just drop that old option, -gfx_passthru, if we're under qemu upstream
> circumstance, like this,
> 

The question is, is there any version of qemu upstream that has
been released that has the old option (-gfx-passthru)?

This gives us a situation that we need to support both the old
(-gfx-passthru) and new (-igd-passthru) options. Presumably we (libxl)
would need to fork a qemu process to determine which option it has and
pass the right one.

Or you can try to keep both old and new option at the same time but
deprecate the old one. Then in a few qemu release cycles later (or
probably one year or two?) you can finally remove the old one. The point
is that to give downstream (in this case, Xen) time to cope with the
change.

> --- a/tools/libxl/libxl_dm.c
> +++ b/tools/libxl/libxl_dm.c
> @@ -318,7 +318,10 @@ static char **
> libxl__build_device_model_args_old(libxl__gc *gc,
>              flexarray_vappend(dm_args, "-net", "none", NULL);
>          }
>          if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
> -            flexarray_append(dm_args, "-gfx_passthru");
> +            if (b_info->device_model_version !=
> +                LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) {
> +                flexarray_append(dm_args, "-gfx_passthru");
> +            }

I don't think this is right if upstream qemu also supports gfx-passthru.

However, you're modifying libxl__build_device_model_args_old, it
strongly suggests that it only affects qemu-trad. That means you don't
even need this patch...

Wei.

>          }
>      } else {
>          if (!sdl && !vnc)
> @@ -702,7 +705,10 @@ static char **
> libxl__build_device_model_args_new(libxl__gc *gc,
>              flexarray_append(dm_args, "none");
>          }
>          if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
> -            flexarray_append(dm_args, "-gfx_passthru");
> +            if (b_info->device_model_version !=
> +                LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) {
> +                flexarray_append(dm_args, "-gfx_passthru");
> +            }
>          }
>      } else {
>          if (!sdl && !vnc) {
> 
> Is this good enough?
> 
> Thanks
> Tiejun

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-29 10:50                   ` Wei Liu
@ 2015-01-30  0:56                     ` Chen, Tiejun
  2015-01-30 12:26                       ` Wei Liu
  2015-01-30 12:26                       ` Wei Liu
  2015-01-30  0:56                     ` Chen, Tiejun
  1 sibling, 2 replies; 40+ messages in thread
From: Chen, Tiejun @ 2015-01-30  0:56 UTC (permalink / raw)
  To: Wei Liu, Gerd Hoffmann, mst
  Cc: xen-devel, Ian Jackson, ian.campbell, qemu-devel

On 2015/1/29 18:50, Wei Liu wrote:
> On Thu, Jan 29, 2015 at 08:41:24AM +0800, Chen, Tiejun wrote:
>> On 2015/1/28 19:12, Wei Liu wrote:
>>> On Wed, Jan 28, 2015 at 08:42:56AM +0800, Chen, Tiejun wrote:
>>>> On 2015/1/27 22:40, Ian Jackson wrote:
>>>>> Chen, Tiejun writes ("Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough"):
>>>>>> On 2015/1/23 8:43, Chen, Tiejun wrote:
>>>>>>> On 2015/1/22 8:51, Chen, Tiejun wrote:
>>>>>>>> At this point I just concern here if we still use 'gfx_passthrou', at
>>>>>>>> least it may look like a backward compatibility with older versions of
>>>>>>>> qemu in Xen side, qemu-xen-traditional. But I'd like to follow your
>>>>>>>> final option.
>>>>> ...
>>>>>>> Any feedback to this option I should follow here?
>>>>>>
>>>>>> Ping...
>>>>>
>>>>> I think this is a question that qemu upstream should answer.
>>>>>
>>>>
>>>> Actually this is just commented by Gerd in qemu upstream. So now looks in
>>>> Xen side you guys don't have any objection to use 'igd-passthru' as well. If
>>>> yes, I'm fine to adopt this.
>>>>
>>>
>>> Yes, we would like to stay in line with upstream.
>>
>> Wei,
>>
>> Thanks for your response.
>>
>>>
>>> Just remember to handle old option in libxl if your old option is already
>>> released by some older version of QEMUs.
>>
>> I just drop that old option, -gfx_passthru, if we're under qemu upstream
>> circumstance, like this,
>>
>
> The question is, is there any version of qemu upstream that has
> been released that has the old option (-gfx-passthru)?

No. Just now we're starting to support IGD passthrough in qemu upstream.

>
> This gives us a situation that we need to support both the old
> (-gfx-passthru) and new (-igd-passthru) options. Presumably we (libxl)
> would need to fork a qemu process to determine which option it has and
> pass the right one.
>
> Or you can try to keep both old and new option at the same time but

Yeah, actually I also have considered to keep both two options at the 
same time. Its really friendly to any qemu version.

> deprecate the old one. Then in a few qemu release cycles later (or

This should be like 'accel=kvm' versus 'enable-kvm' in qemu upstream. 
They're coexisted now but just the former is a modern option.

> probably one year or two?) you can finally remove the old one. The point
> is that to give downstream (in this case, Xen) time to cope with the
> change.

Here I'm fine to this way.

So Gerd,

What about this?

>
>> --- a/tools/libxl/libxl_dm.c
>> +++ b/tools/libxl/libxl_dm.c
>> @@ -318,7 +318,10 @@ static char **
>> libxl__build_device_model_args_old(libxl__gc *gc,
>>               flexarray_vappend(dm_args, "-net", "none", NULL);
>>           }
>>           if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
>> -            flexarray_append(dm_args, "-gfx_passthru");
>> +            if (b_info->device_model_version !=
>> +                LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) {
>> +                flexarray_append(dm_args, "-gfx_passthru");
>> +            }
>
> I don't think this is right if upstream qemu also supports gfx-passthru.
>
> However, you're modifying libxl__build_device_model_args_old, it
> strongly suggests that it only affects qemu-trad. That means you don't
> even need this patch...

You're right and thanks.

Thanks
Tiejun

>
> Wei.
>
>>           }
>>       } else {
>>           if (!sdl && !vnc)
>> @@ -702,7 +705,10 @@ static char **
>> libxl__build_device_model_args_new(libxl__gc *gc,
>>               flexarray_append(dm_args, "none");
>>           }
>>           if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
>> -            flexarray_append(dm_args, "-gfx_passthru");
>> +            if (b_info->device_model_version !=
>> +                LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) {
>> +                flexarray_append(dm_args, "-gfx_passthru");
>> +            }
>>           }
>>       } else {
>>           if (!sdl && !vnc) {
>>
>> Is this good enough?
>>
>> Thanks
>> Tiejun
>

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-29 10:50                   ` Wei Liu
  2015-01-30  0:56                     ` Chen, Tiejun
@ 2015-01-30  0:56                     ` Chen, Tiejun
  1 sibling, 0 replies; 40+ messages in thread
From: Chen, Tiejun @ 2015-01-30  0:56 UTC (permalink / raw)
  To: Wei Liu, Gerd Hoffmann, mst
  Cc: xen-devel, Ian Jackson, ian.campbell, qemu-devel

On 2015/1/29 18:50, Wei Liu wrote:
> On Thu, Jan 29, 2015 at 08:41:24AM +0800, Chen, Tiejun wrote:
>> On 2015/1/28 19:12, Wei Liu wrote:
>>> On Wed, Jan 28, 2015 at 08:42:56AM +0800, Chen, Tiejun wrote:
>>>> On 2015/1/27 22:40, Ian Jackson wrote:
>>>>> Chen, Tiejun writes ("Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough"):
>>>>>> On 2015/1/23 8:43, Chen, Tiejun wrote:
>>>>>>> On 2015/1/22 8:51, Chen, Tiejun wrote:
>>>>>>>> At this point I just concern here if we still use 'gfx_passthrou', at
>>>>>>>> least it may look like a backward compatibility with older versions of
>>>>>>>> qemu in Xen side, qemu-xen-traditional. But I'd like to follow your
>>>>>>>> final option.
>>>>> ...
>>>>>>> Any feedback to this option I should follow here?
>>>>>>
>>>>>> Ping...
>>>>>
>>>>> I think this is a question that qemu upstream should answer.
>>>>>
>>>>
>>>> Actually this is just commented by Gerd in qemu upstream. So now looks in
>>>> Xen side you guys don't have any objection to use 'igd-passthru' as well. If
>>>> yes, I'm fine to adopt this.
>>>>
>>>
>>> Yes, we would like to stay in line with upstream.
>>
>> Wei,
>>
>> Thanks for your response.
>>
>>>
>>> Just remember to handle old option in libxl if your old option is already
>>> released by some older version of QEMUs.
>>
>> I just drop that old option, -gfx_passthru, if we're under qemu upstream
>> circumstance, like this,
>>
>
> The question is, is there any version of qemu upstream that has
> been released that has the old option (-gfx-passthru)?

No. Just now we're starting to support IGD passthrough in qemu upstream.

>
> This gives us a situation that we need to support both the old
> (-gfx-passthru) and new (-igd-passthru) options. Presumably we (libxl)
> would need to fork a qemu process to determine which option it has and
> pass the right one.
>
> Or you can try to keep both old and new option at the same time but

Yeah, actually I also have considered to keep both two options at the 
same time. Its really friendly to any qemu version.

> deprecate the old one. Then in a few qemu release cycles later (or

This should be like 'accel=kvm' versus 'enable-kvm' in qemu upstream. 
They're coexisted now but just the former is a modern option.

> probably one year or two?) you can finally remove the old one. The point
> is that to give downstream (in this case, Xen) time to cope with the
> change.

Here I'm fine to this way.

So Gerd,

What about this?

>
>> --- a/tools/libxl/libxl_dm.c
>> +++ b/tools/libxl/libxl_dm.c
>> @@ -318,7 +318,10 @@ static char **
>> libxl__build_device_model_args_old(libxl__gc *gc,
>>               flexarray_vappend(dm_args, "-net", "none", NULL);
>>           }
>>           if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
>> -            flexarray_append(dm_args, "-gfx_passthru");
>> +            if (b_info->device_model_version !=
>> +                LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) {
>> +                flexarray_append(dm_args, "-gfx_passthru");
>> +            }
>
> I don't think this is right if upstream qemu also supports gfx-passthru.
>
> However, you're modifying libxl__build_device_model_args_old, it
> strongly suggests that it only affects qemu-trad. That means you don't
> even need this patch...

You're right and thanks.

Thanks
Tiejun

>
> Wei.
>
>>           }
>>       } else {
>>           if (!sdl && !vnc)
>> @@ -702,7 +705,10 @@ static char **
>> libxl__build_device_model_args_new(libxl__gc *gc,
>>               flexarray_append(dm_args, "none");
>>           }
>>           if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
>> -            flexarray_append(dm_args, "-gfx_passthru");
>> +            if (b_info->device_model_version !=
>> +                LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) {
>> +                flexarray_append(dm_args, "-gfx_passthru");
>> +            }
>>           }
>>       } else {
>>           if (!sdl && !vnc) {
>>
>> Is this good enough?
>>
>> Thanks
>> Tiejun
>

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-30  0:56                     ` Chen, Tiejun
@ 2015-01-30 12:26                       ` Wei Liu
  2015-01-31  7:07                         ` Xu, Quan
                                           ` (3 more replies)
  2015-01-30 12:26                       ` Wei Liu
  1 sibling, 4 replies; 40+ messages in thread
From: Wei Liu @ 2015-01-30 12:26 UTC (permalink / raw)
  To: Chen, Tiejun
  Cc: Wei Liu, ian.campbell, mst, Ian Jackson, qemu-devel, xen-devel,
	Gerd Hoffmann

On Fri, Jan 30, 2015 at 08:56:48AM +0800, Chen, Tiejun wrote:
[...]
> >>>
> >>>Just remember to handle old option in libxl if your old option is already
> >>>released by some older version of QEMUs.
> >>
> >>I just drop that old option, -gfx_passthru, if we're under qemu upstream
> >>circumstance, like this,
> >>
> >
> >The question is, is there any version of qemu upstream that has
> >been released that has the old option (-gfx-passthru)?
> 
> No. Just now we're starting to support IGD passthrough in qemu upstream.
> 

Right, as of QEMU 2.2.0 there's no support of IGD passthrough in QMEU
upstream.

> >
> >This gives us a situation that we need to support both the old
> >(-gfx-passthru) and new (-igd-passthru) options. Presumably we (libxl)
> >would need to fork a qemu process to determine which option it has and
> >pass the right one.
> >
> >Or you can try to keep both old and new option at the same time but
> 
> Yeah, actually I also have considered to keep both two options at the same
> time. Its really friendly to any qemu version.
> 
> >deprecate the old one. Then in a few qemu release cycles later (or
> 
> This should be like 'accel=kvm' versus 'enable-kvm' in qemu upstream.
> They're coexisted now but just the former is a modern option.
> 
> >probably one year or two?) you can finally remove the old one. The point
> >is that to give downstream (in this case, Xen) time to cope with the
> >change.
> 
> Here I'm fine to this way.
> 
> So Gerd,
> 

So you don't actually need to ask Gerd this question because there is no
old option to keep in qemu upstream.

Libxl (or any sensible toolstack) will just do the right thing to either
pass -igd-passthru (or whatever you guys agree upon) to qemu upstream or
pass -gfx-passthru to qemu traditional. :-)

Wei.

> What about this?
> 

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-30  0:56                     ` Chen, Tiejun
  2015-01-30 12:26                       ` Wei Liu
@ 2015-01-30 12:26                       ` Wei Liu
  1 sibling, 0 replies; 40+ messages in thread
From: Wei Liu @ 2015-01-30 12:26 UTC (permalink / raw)
  To: Chen, Tiejun
  Cc: Wei Liu, ian.campbell, mst, Ian Jackson, qemu-devel, xen-devel,
	Gerd Hoffmann

On Fri, Jan 30, 2015 at 08:56:48AM +0800, Chen, Tiejun wrote:
[...]
> >>>
> >>>Just remember to handle old option in libxl if your old option is already
> >>>released by some older version of QEMUs.
> >>
> >>I just drop that old option, -gfx_passthru, if we're under qemu upstream
> >>circumstance, like this,
> >>
> >
> >The question is, is there any version of qemu upstream that has
> >been released that has the old option (-gfx-passthru)?
> 
> No. Just now we're starting to support IGD passthrough in qemu upstream.
> 

Right, as of QEMU 2.2.0 there's no support of IGD passthrough in QMEU
upstream.

> >
> >This gives us a situation that we need to support both the old
> >(-gfx-passthru) and new (-igd-passthru) options. Presumably we (libxl)
> >would need to fork a qemu process to determine which option it has and
> >pass the right one.
> >
> >Or you can try to keep both old and new option at the same time but
> 
> Yeah, actually I also have considered to keep both two options at the same
> time. Its really friendly to any qemu version.
> 
> >deprecate the old one. Then in a few qemu release cycles later (or
> 
> This should be like 'accel=kvm' versus 'enable-kvm' in qemu upstream.
> They're coexisted now but just the former is a modern option.
> 
> >probably one year or two?) you can finally remove the old one. The point
> >is that to give downstream (in this case, Xen) time to cope with the
> >change.
> 
> Here I'm fine to this way.
> 
> So Gerd,
> 

So you don't actually need to ask Gerd this question because there is no
old option to keep in qemu upstream.

Libxl (or any sensible toolstack) will just do the right thing to either
pass -igd-passthru (or whatever you guys agree upon) to qemu upstream or
pass -gfx-passthru to qemu traditional. :-)

Wei.

> What about this?
> 

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

* Re: [Qemu-devel] [Xen-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-30 12:26                       ` Wei Liu
  2015-01-31  7:07                         ` Xu, Quan
@ 2015-01-31  7:07                         ` Xu, Quan
  2015-01-31 14:33                           ` Wei Liu
  2015-01-31 14:33                           ` [Qemu-devel] " Wei Liu
  2015-02-02  0:43                         ` Chen, Tiejun
  2015-02-02  0:43                         ` Chen, Tiejun
  3 siblings, 2 replies; 40+ messages in thread
From: Xu, Quan @ 2015-01-31  7:07 UTC (permalink / raw)
  To: Wei Liu, Chen, Tiejun
  Cc: ian.campbell, mst, Ian Jackson, qemu-devel, xen-devel, Gerd Hoffmann



> -----Original Message-----
> From: xen-devel-bounces@lists.xen.org
> [mailto:xen-devel-bounces@lists.xen.org] On Behalf Of Wei Liu
> Sent: Friday, January 30, 2015 8:26 PM
> To: Chen, Tiejun
> Cc: Wei Liu; ian.campbell@citrix.com; mst@redhat.com; Ian Jackson;
> qemu-devel@nongnu.org; xen-devel@lists.xen.org; Gerd Hoffmann
> Subject: Re: [Xen-devel] [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine
> property to support IGD GFX passthrough
> 
> On Fri, Jan 30, 2015 at 08:56:48AM +0800, Chen, Tiejun wrote:
> [...]
> > >>>
> > >>>Just remember to handle old option in libxl if your old option is
> > >>>already released by some older version of QEMUs.
> > >>
> > >>I just drop that old option, -gfx_passthru, if we're under qemu
> > >>upstream circumstance, like this,
> > >>
> > >
> > >The question is, is there any version of qemu upstream that has been
> > >released that has the old option (-gfx-passthru)?
> >
> > No. Just now we're starting to support IGD passthrough in qemu upstream.
> >
> 
> Right, as of QEMU 2.2.0 there's no support of IGD passthrough in QMEU
> upstream.
> 

Just a question:
   Now what features do vt-d support? Thanks.

-Quan

> > >
> > >This gives us a situation that we need to support both the old
> > >(-gfx-passthru) and new (-igd-passthru) options. Presumably we
> > >(libxl) would need to fork a qemu process to determine which option
> > >it has and pass the right one.
> > >
> > >Or you can try to keep both old and new option at the same time but
> >
> > Yeah, actually I also have considered to keep both two options at the
> > same time. Its really friendly to any qemu version.
> >
> > >deprecate the old one. Then in a few qemu release cycles later (or
> >
> > This should be like 'accel=kvm' versus 'enable-kvm' in qemu upstream.
> > They're coexisted now but just the former is a modern option.
> >
> > >probably one year or two?) you can finally remove the old one. The
> > >point is that to give downstream (in this case, Xen) time to cope
> > >with the change.
> >
> > Here I'm fine to this way.
> >
> > So Gerd,
> >
> 
> So you don't actually need to ask Gerd this question because there is no old
> option to keep in qemu upstream.
> 
> Libxl (or any sensible toolstack) will just do the right thing to either pass
> -igd-passthru (or whatever you guys agree upon) to qemu upstream or pass
> -gfx-passthru to qemu traditional. :-)
> 
> Wei.
> 
> > What about this?
> >
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-30 12:26                       ` Wei Liu
@ 2015-01-31  7:07                         ` Xu, Quan
  2015-01-31  7:07                         ` [Qemu-devel] [Xen-devel] " Xu, Quan
                                           ` (2 subsequent siblings)
  3 siblings, 0 replies; 40+ messages in thread
From: Xu, Quan @ 2015-01-31  7:07 UTC (permalink / raw)
  To: Wei Liu, Chen, Tiejun
  Cc: ian.campbell, mst, Ian Jackson, qemu-devel, xen-devel, Gerd Hoffmann



> -----Original Message-----
> From: xen-devel-bounces@lists.xen.org
> [mailto:xen-devel-bounces@lists.xen.org] On Behalf Of Wei Liu
> Sent: Friday, January 30, 2015 8:26 PM
> To: Chen, Tiejun
> Cc: Wei Liu; ian.campbell@citrix.com; mst@redhat.com; Ian Jackson;
> qemu-devel@nongnu.org; xen-devel@lists.xen.org; Gerd Hoffmann
> Subject: Re: [Xen-devel] [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine
> property to support IGD GFX passthrough
> 
> On Fri, Jan 30, 2015 at 08:56:48AM +0800, Chen, Tiejun wrote:
> [...]
> > >>>
> > >>>Just remember to handle old option in libxl if your old option is
> > >>>already released by some older version of QEMUs.
> > >>
> > >>I just drop that old option, -gfx_passthru, if we're under qemu
> > >>upstream circumstance, like this,
> > >>
> > >
> > >The question is, is there any version of qemu upstream that has been
> > >released that has the old option (-gfx-passthru)?
> >
> > No. Just now we're starting to support IGD passthrough in qemu upstream.
> >
> 
> Right, as of QEMU 2.2.0 there's no support of IGD passthrough in QMEU
> upstream.
> 

Just a question:
   Now what features do vt-d support? Thanks.

-Quan

> > >
> > >This gives us a situation that we need to support both the old
> > >(-gfx-passthru) and new (-igd-passthru) options. Presumably we
> > >(libxl) would need to fork a qemu process to determine which option
> > >it has and pass the right one.
> > >
> > >Or you can try to keep both old and new option at the same time but
> >
> > Yeah, actually I also have considered to keep both two options at the
> > same time. Its really friendly to any qemu version.
> >
> > >deprecate the old one. Then in a few qemu release cycles later (or
> >
> > This should be like 'accel=kvm' versus 'enable-kvm' in qemu upstream.
> > They're coexisted now but just the former is a modern option.
> >
> > >probably one year or two?) you can finally remove the old one. The
> > >point is that to give downstream (in this case, Xen) time to cope
> > >with the change.
> >
> > Here I'm fine to this way.
> >
> > So Gerd,
> >
> 
> So you don't actually need to ask Gerd this question because there is no old
> option to keep in qemu upstream.
> 
> Libxl (or any sensible toolstack) will just do the right thing to either pass
> -igd-passthru (or whatever you guys agree upon) to qemu upstream or pass
> -gfx-passthru to qemu traditional. :-)
> 
> Wei.
> 
> > What about this?
> >
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

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

* Re: [Qemu-devel] [Xen-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-31  7:07                         ` [Qemu-devel] [Xen-devel] " Xu, Quan
@ 2015-01-31 14:33                           ` Wei Liu
  2015-01-31 15:21                             ` [Qemu-devel] " Xu, Quan
  2015-01-31 15:21                             ` [Qemu-devel] [Xen-devel] " Xu, Quan
  2015-01-31 14:33                           ` [Qemu-devel] " Wei Liu
  1 sibling, 2 replies; 40+ messages in thread
From: Wei Liu @ 2015-01-31 14:33 UTC (permalink / raw)
  To: Xu, Quan
  Cc: Wei Liu, ian.campbell, mst, Ian Jackson, qemu-devel, xen-devel,
	Gerd Hoffmann, Chen, Tiejun

On Sat, Jan 31, 2015 at 07:07:16AM +0000, Xu, Quan wrote:
> 
> 
> > -----Original Message-----
> > From: xen-devel-bounces@lists.xen.org
> > [mailto:xen-devel-bounces@lists.xen.org] On Behalf Of Wei Liu
> > Sent: Friday, January 30, 2015 8:26 PM
> > To: Chen, Tiejun
> > Cc: Wei Liu; ian.campbell@citrix.com; mst@redhat.com; Ian Jackson;
> > qemu-devel@nongnu.org; xen-devel@lists.xen.org; Gerd Hoffmann
> > Subject: Re: [Xen-devel] [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine
> > property to support IGD GFX passthrough
> > 
> > On Fri, Jan 30, 2015 at 08:56:48AM +0800, Chen, Tiejun wrote:
> > [...]
> > > >>>
> > > >>>Just remember to handle old option in libxl if your old option is
> > > >>>already released by some older version of QEMUs.
> > > >>
> > > >>I just drop that old option, -gfx_passthru, if we're under qemu
> > > >>upstream circumstance, like this,
> > > >>
> > > >
> > > >The question is, is there any version of qemu upstream that has been
> > > >released that has the old option (-gfx-passthru)?
> > >
> > > No. Just now we're starting to support IGD passthrough in qemu upstream.
> > >
> > 
> > Right, as of QEMU 2.2.0 there's no support of IGD passthrough in QMEU
> > upstream.
> > 
> 
> Just a question:
>    Now what features do vt-d support? Thanks.
> 

I don't know whether vt-d is supported in qemu upstream.

But if there is support in upstream and you want to change some options,
the same principle in my previous email still applies.

Wei.

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-31  7:07                         ` [Qemu-devel] [Xen-devel] " Xu, Quan
  2015-01-31 14:33                           ` Wei Liu
@ 2015-01-31 14:33                           ` Wei Liu
  1 sibling, 0 replies; 40+ messages in thread
From: Wei Liu @ 2015-01-31 14:33 UTC (permalink / raw)
  To: Xu, Quan
  Cc: Wei Liu, ian.campbell, mst, Ian Jackson, qemu-devel, xen-devel,
	Gerd Hoffmann, Chen, Tiejun

On Sat, Jan 31, 2015 at 07:07:16AM +0000, Xu, Quan wrote:
> 
> 
> > -----Original Message-----
> > From: xen-devel-bounces@lists.xen.org
> > [mailto:xen-devel-bounces@lists.xen.org] On Behalf Of Wei Liu
> > Sent: Friday, January 30, 2015 8:26 PM
> > To: Chen, Tiejun
> > Cc: Wei Liu; ian.campbell@citrix.com; mst@redhat.com; Ian Jackson;
> > qemu-devel@nongnu.org; xen-devel@lists.xen.org; Gerd Hoffmann
> > Subject: Re: [Xen-devel] [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine
> > property to support IGD GFX passthrough
> > 
> > On Fri, Jan 30, 2015 at 08:56:48AM +0800, Chen, Tiejun wrote:
> > [...]
> > > >>>
> > > >>>Just remember to handle old option in libxl if your old option is
> > > >>>already released by some older version of QEMUs.
> > > >>
> > > >>I just drop that old option, -gfx_passthru, if we're under qemu
> > > >>upstream circumstance, like this,
> > > >>
> > > >
> > > >The question is, is there any version of qemu upstream that has been
> > > >released that has the old option (-gfx-passthru)?
> > >
> > > No. Just now we're starting to support IGD passthrough in qemu upstream.
> > >
> > 
> > Right, as of QEMU 2.2.0 there's no support of IGD passthrough in QMEU
> > upstream.
> > 
> 
> Just a question:
>    Now what features do vt-d support? Thanks.
> 

I don't know whether vt-d is supported in qemu upstream.

But if there is support in upstream and you want to change some options,
the same principle in my previous email still applies.

Wei.

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

* Re: [Qemu-devel] [Xen-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-31 14:33                           ` Wei Liu
  2015-01-31 15:21                             ` [Qemu-devel] " Xu, Quan
@ 2015-01-31 15:21                             ` Xu, Quan
  1 sibling, 0 replies; 40+ messages in thread
From: Xu, Quan @ 2015-01-31 15:21 UTC (permalink / raw)
  To: Wei Liu
  Cc: ian.campbell, mst, Ian Jackson, qemu-devel, xen-devel,
	Gerd Hoffmann, Chen, Tiejun



> -----Original Message-----
> From: Wei Liu [mailto:wei.liu2@citrix.com]
> Sent: Saturday, January 31, 2015 10:33 PM
> To: Xu, Quan
> Cc: Wei Liu; Chen, Tiejun; ian.campbell@citrix.com; mst@redhat.com; Ian Jackson;
> qemu-devel@nongnu.org; xen-devel@lists.xen.org; Gerd Hoffmann
> Subject: Re: [Xen-devel] [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine
> property to support IGD GFX passthrough
> 
> On Sat, Jan 31, 2015 at 07:07:16AM +0000, Xu, Quan wrote:
> >
> >
> > > -----Original Message-----
> > > From: xen-devel-bounces@lists.xen.org
> > > [mailto:xen-devel-bounces@lists.xen.org] On Behalf Of Wei Liu
> > > Sent: Friday, January 30, 2015 8:26 PM
> > > To: Chen, Tiejun
> > > Cc: Wei Liu; ian.campbell@citrix.com; mst@redhat.com; Ian Jackson;
> > > qemu-devel@nongnu.org; xen-devel@lists.xen.org; Gerd Hoffmann
> > > Subject: Re: [Xen-devel] [Qemu-devel] [RFC][PATCH 1/1] libxl: add
> > > one machine property to support IGD GFX passthrough
> > >
> > > On Fri, Jan 30, 2015 at 08:56:48AM +0800, Chen, Tiejun wrote:
> > > [...]
> > > > >>>
> > > > >>>Just remember to handle old option in libxl if your old option
> > > > >>>is already released by some older version of QEMUs.
> > > > >>
> > > > >>I just drop that old option, -gfx_passthru, if we're under qemu
> > > > >>upstream circumstance, like this,
> > > > >>
> > > > >
> > > > >The question is, is there any version of qemu upstream that has
> > > > >been released that has the old option (-gfx-passthru)?
> > > >
> > > > No. Just now we're starting to support IGD passthrough in qemu upstream.
> > > >
> > >
> > > Right, as of QEMU 2.2.0 there's no support of IGD passthrough in
> > > QMEU upstream.
> > >
> >
> > Just a question:
> >    Now what features do vt-d support? Thanks.
> >
> 
> I don't know whether vt-d is supported in qemu upstream.
> 
> But if there is support in upstream and you want to change some options, the
> same principle in my previous email still applies.
> 
> Wei.

Thanks.  -Quan

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-31 14:33                           ` Wei Liu
@ 2015-01-31 15:21                             ` Xu, Quan
  2015-01-31 15:21                             ` [Qemu-devel] [Xen-devel] " Xu, Quan
  1 sibling, 0 replies; 40+ messages in thread
From: Xu, Quan @ 2015-01-31 15:21 UTC (permalink / raw)
  To: Wei Liu
  Cc: ian.campbell, mst, Ian Jackson, qemu-devel, xen-devel,
	Gerd Hoffmann, Chen, Tiejun



> -----Original Message-----
> From: Wei Liu [mailto:wei.liu2@citrix.com]
> Sent: Saturday, January 31, 2015 10:33 PM
> To: Xu, Quan
> Cc: Wei Liu; Chen, Tiejun; ian.campbell@citrix.com; mst@redhat.com; Ian Jackson;
> qemu-devel@nongnu.org; xen-devel@lists.xen.org; Gerd Hoffmann
> Subject: Re: [Xen-devel] [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine
> property to support IGD GFX passthrough
> 
> On Sat, Jan 31, 2015 at 07:07:16AM +0000, Xu, Quan wrote:
> >
> >
> > > -----Original Message-----
> > > From: xen-devel-bounces@lists.xen.org
> > > [mailto:xen-devel-bounces@lists.xen.org] On Behalf Of Wei Liu
> > > Sent: Friday, January 30, 2015 8:26 PM
> > > To: Chen, Tiejun
> > > Cc: Wei Liu; ian.campbell@citrix.com; mst@redhat.com; Ian Jackson;
> > > qemu-devel@nongnu.org; xen-devel@lists.xen.org; Gerd Hoffmann
> > > Subject: Re: [Xen-devel] [Qemu-devel] [RFC][PATCH 1/1] libxl: add
> > > one machine property to support IGD GFX passthrough
> > >
> > > On Fri, Jan 30, 2015 at 08:56:48AM +0800, Chen, Tiejun wrote:
> > > [...]
> > > > >>>
> > > > >>>Just remember to handle old option in libxl if your old option
> > > > >>>is already released by some older version of QEMUs.
> > > > >>
> > > > >>I just drop that old option, -gfx_passthru, if we're under qemu
> > > > >>upstream circumstance, like this,
> > > > >>
> > > > >
> > > > >The question is, is there any version of qemu upstream that has
> > > > >been released that has the old option (-gfx-passthru)?
> > > >
> > > > No. Just now we're starting to support IGD passthrough in qemu upstream.
> > > >
> > >
> > > Right, as of QEMU 2.2.0 there's no support of IGD passthrough in
> > > QMEU upstream.
> > >
> >
> > Just a question:
> >    Now what features do vt-d support? Thanks.
> >
> 
> I don't know whether vt-d is supported in qemu upstream.
> 
> But if there is support in upstream and you want to change some options, the
> same principle in my previous email still applies.
> 
> Wei.

Thanks.  -Quan

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-30 12:26                       ` Wei Liu
  2015-01-31  7:07                         ` Xu, Quan
  2015-01-31  7:07                         ` [Qemu-devel] [Xen-devel] " Xu, Quan
@ 2015-02-02  0:43                         ` Chen, Tiejun
  2015-02-02  0:43                         ` Chen, Tiejun
  3 siblings, 0 replies; 40+ messages in thread
From: Chen, Tiejun @ 2015-02-02  0:43 UTC (permalink / raw)
  To: Wei Liu
  Cc: ian.campbell, mst, Ian Jackson, qemu-devel, xen-devel, Gerd Hoffmann

On 2015/1/30 20:26, Wei Liu wrote:
> On Fri, Jan 30, 2015 at 08:56:48AM +0800, Chen, Tiejun wrote:
> [...]
>>>>>
>>>>> Just remember to handle old option in libxl if your old option is already
>>>>> released by some older version of QEMUs.
>>>>
>>>> I just drop that old option, -gfx_passthru, if we're under qemu upstream
>>>> circumstance, like this,
>>>>
>>>
>>> The question is, is there any version of qemu upstream that has
>>> been released that has the old option (-gfx-passthru)?
>>
>> No. Just now we're starting to support IGD passthrough in qemu upstream.
>>
>
> Right, as of QEMU 2.2.0 there's no support of IGD passthrough in QMEU
> upstream.
>
>>>
>>> This gives us a situation that we need to support both the old
>>> (-gfx-passthru) and new (-igd-passthru) options. Presumably we (libxl)
>>> would need to fork a qemu process to determine which option it has and
>>> pass the right one.
>>>
>>> Or you can try to keep both old and new option at the same time but
>>
>> Yeah, actually I also have considered to keep both two options at the same
>> time. Its really friendly to any qemu version.
>>
>>> deprecate the old one. Then in a few qemu release cycles later (or
>>
>> This should be like 'accel=kvm' versus 'enable-kvm' in qemu upstream.
>> They're coexisted now but just the former is a modern option.
>>
>>> probably one year or two?) you can finally remove the old one. The point
>>> is that to give downstream (in this case, Xen) time to cope with the
>>> change.
>>
>> Here I'm fine to this way.
>>
>> So Gerd,
>>
>
> So you don't actually need to ask Gerd this question because there is no
> old option to keep in qemu upstream.
>
> Libxl (or any sensible toolstack) will just do the right thing to either
> pass -igd-passthru (or whatever you guys agree upon) to qemu upstream or
> pass -gfx-passthru to qemu traditional. :-)
>

Okay let me try do this.

Thanks
Tiejun

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

* Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
  2015-01-30 12:26                       ` Wei Liu
                                           ` (2 preceding siblings ...)
  2015-02-02  0:43                         ` Chen, Tiejun
@ 2015-02-02  0:43                         ` Chen, Tiejun
  3 siblings, 0 replies; 40+ messages in thread
From: Chen, Tiejun @ 2015-02-02  0:43 UTC (permalink / raw)
  To: Wei Liu
  Cc: ian.campbell, mst, Ian Jackson, qemu-devel, xen-devel, Gerd Hoffmann

On 2015/1/30 20:26, Wei Liu wrote:
> On Fri, Jan 30, 2015 at 08:56:48AM +0800, Chen, Tiejun wrote:
> [...]
>>>>>
>>>>> Just remember to handle old option in libxl if your old option is already
>>>>> released by some older version of QEMUs.
>>>>
>>>> I just drop that old option, -gfx_passthru, if we're under qemu upstream
>>>> circumstance, like this,
>>>>
>>>
>>> The question is, is there any version of qemu upstream that has
>>> been released that has the old option (-gfx-passthru)?
>>
>> No. Just now we're starting to support IGD passthrough in qemu upstream.
>>
>
> Right, as of QEMU 2.2.0 there's no support of IGD passthrough in QMEU
> upstream.
>
>>>
>>> This gives us a situation that we need to support both the old
>>> (-gfx-passthru) and new (-igd-passthru) options. Presumably we (libxl)
>>> would need to fork a qemu process to determine which option it has and
>>> pass the right one.
>>>
>>> Or you can try to keep both old and new option at the same time but
>>
>> Yeah, actually I also have considered to keep both two options at the same
>> time. Its really friendly to any qemu version.
>>
>>> deprecate the old one. Then in a few qemu release cycles later (or
>>
>> This should be like 'accel=kvm' versus 'enable-kvm' in qemu upstream.
>> They're coexisted now but just the former is a modern option.
>>
>>> probably one year or two?) you can finally remove the old one. The point
>>> is that to give downstream (in this case, Xen) time to cope with the
>>> change.
>>
>> Here I'm fine to this way.
>>
>> So Gerd,
>>
>
> So you don't actually need to ask Gerd this question because there is no
> old option to keep in qemu upstream.
>
> Libxl (or any sensible toolstack) will just do the right thing to either
> pass -igd-passthru (or whatever you guys agree upon) to qemu upstream or
> pass -gfx-passthru to qemu traditional. :-)
>

Okay let me try do this.

Thanks
Tiejun

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

* [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough
@ 2015-01-21  7:19 Tiejun Chen
  0 siblings, 0 replies; 40+ messages in thread
From: Tiejun Chen @ 2015-01-21  7:19 UTC (permalink / raw)
  To: ian.jackson, ian.campbell, wei.liu2; +Cc: qemu-devel, kraxel, xen-devel

When we're working to support IGD GFX passthrough with qemu
upstream, instead of "-gfx_passthru" we'd like to make that
a machine option, "-machine xxx,gfx_passthru=on". This need
to bring several changes on tool side.

Signed-off-by: Tiejun Chen <tiejun.chen@intel.com>
---
 tools/libxl/libxl_dm.c | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index c2b0487..2b59d2c 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -318,7 +318,10 @@ static char ** libxl__build_device_model_args_old(libxl__gc *gc,
             flexarray_vappend(dm_args, "-net", "none", NULL);
         }
         if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
-            flexarray_append(dm_args, "-gfx_passthru");
+            if (b_info->device_model_version !=
+                LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) {
+                flexarray_append(dm_args, "-gfx_passthru");
+            }
         }
     } else {
         if (!sdl && !vnc)
@@ -702,7 +705,10 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
             flexarray_append(dm_args, "none");
         }
         if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
-            flexarray_append(dm_args, "-gfx_passthru");
+            if (b_info->device_model_version !=
+                LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) {
+                flexarray_append(dm_args, "-gfx_passthru");
+            }
         }
     } else {
         if (!sdl && !vnc) {
@@ -748,6 +754,15 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
                                             machinearg, max_ram_below_4g);
             }
         }
+
+        if (b_info->device_model_version ==
+            LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) {
+            if (libxl_defbool_val(b_info->u.hvm.gfx_passthru)) {
+                machinearg = libxl__sprintf(gc, "%s,gfx_passthru=on",
+                                            machinearg);
+            }
+        }
+
         flexarray_append(dm_args, machinearg);
         for (i = 0; b_info->extra_hvm && b_info->extra_hvm[i] != NULL; i++)
             flexarray_append(dm_args, b_info->extra_hvm[i]);
-- 
1.9.1

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

end of thread, other threads:[~2015-02-02  0:43 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-21  7:19 [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough Tiejun Chen
2015-01-21  7:26 ` Chen, Tiejun
2015-01-21  7:26 ` Chen, Tiejun
2015-01-21 11:37 ` Ian Jackson
2015-01-21 11:37 ` [Qemu-devel] " Ian Jackson
2015-01-21 11:56   ` Ian Campbell
2015-01-22  0:55     ` Chen, Tiejun
2015-01-22  0:55     ` Chen, Tiejun
2015-01-21 11:56   ` Ian Campbell
2015-01-21 13:48   ` [Qemu-devel] " Gerd Hoffmann
2015-01-22  0:51     ` Chen, Tiejun
2015-01-22  0:51     ` [Qemu-devel] " Chen, Tiejun
2015-01-23  0:43       ` Chen, Tiejun
2015-01-26  0:44         ` Chen, Tiejun
2015-01-26  0:44         ` Chen, Tiejun
2015-01-27 14:40           ` Ian Jackson
2015-01-28  0:42             ` Chen, Tiejun
2015-01-28  0:42             ` Chen, Tiejun
2015-01-28 11:12               ` Wei Liu
2015-01-28 11:12               ` Wei Liu
2015-01-29  0:41                 ` Chen, Tiejun
2015-01-29 10:50                   ` Wei Liu
2015-01-30  0:56                     ` Chen, Tiejun
2015-01-30 12:26                       ` Wei Liu
2015-01-31  7:07                         ` Xu, Quan
2015-01-31  7:07                         ` [Qemu-devel] [Xen-devel] " Xu, Quan
2015-01-31 14:33                           ` Wei Liu
2015-01-31 15:21                             ` [Qemu-devel] " Xu, Quan
2015-01-31 15:21                             ` [Qemu-devel] [Xen-devel] " Xu, Quan
2015-01-31 14:33                           ` [Qemu-devel] " Wei Liu
2015-02-02  0:43                         ` Chen, Tiejun
2015-02-02  0:43                         ` Chen, Tiejun
2015-01-30 12:26                       ` Wei Liu
2015-01-30  0:56                     ` Chen, Tiejun
2015-01-29 10:50                   ` Wei Liu
2015-01-29  0:41                 ` Chen, Tiejun
2015-01-27 14:40           ` Ian Jackson
2015-01-23  0:43       ` Chen, Tiejun
2015-01-21 13:48   ` Gerd Hoffmann
2015-01-21  7:19 Tiejun Chen

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.