Message ID | 1421824792-3925-1-git-send-email-tiejun.chen@intel.com |
---|---|
State | New |
Headers | show |
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]); >
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.
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.
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
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
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
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
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
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.
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
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 >
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]);
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(-)