libxl: try to support IGD passthrough for qemu upstream
v4 cover libxl: try to support IGD passthrough for qemu upstream
Ian,
As we discussed previously,
http://patchwork.ozlabs.org/patch/457055/
now it's time to push this into on xen/tools side since all qemu stuffs have been merged.
https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg02094.html
v4:
Ian,
Actually we had v3.5 online previously, which was reviewed by you.
http://permalink.gmane.org/gmane.comp.emulators.qemu/329100
So here I just bring a little bit to refine code just for patch #2 according to out last conversation.
v3:
* Refine some codes based on Campbell's feedback so thanks for Campbell's kind guideline to patch #2
* Update the manpages in patch #2
v2:
* Refine patch #2's head description
* Improve codes quality inside patch #1 based on Wei's comments
* Refill the summary inside patch #0 based on Konrad and Wei's suggestion
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,igd-passthru=on".
https://lists.nongnu.org/archive/html/qemu-devel/2015-01/msg02050.html
This need to bring a change on tool side.
After a discussion with Campbell, we'd like to construct a table to record all IGD devices we can support. If we hit that table, we should pass that option. And so we also introduce a new field of type, 'gfx_passthru_kind', to cooperate with 'gfx_passthru' to cover all scenarios like this,
gfx_passthru = 0 => sets build_info.u.gfx_passthru to false
gfx_passthru = 1 => sets build_info.u.gfx_passthru to true and
build_info.u.gfx_passthru_kind to DEFAULT
gfx_passthru = "igd" => sets build_info.u.gfx_passthru to false
and build_info.u.gfx_passthru_kind to IGD
And note actually that option "-gfx_passthru" is just introduced to work for qemu-xen-traditional so we should get this away from libxl__build_device_model_args_new() in the case of qemu upstream.
----------------------------------------------------------------
Tiejun Chen (2):
libxl: introduce libxl__is_igd_vga_passthru
libxl: introduce gfx_passthru_kind
docs/man/xl.cfg.pod.5 | 35 ++++++++-- tools/libxl/libxl.h | 6 ++ tools/libxl/libxl_dm.c | 46 +++++++++++-- tools/libxl/libxl_internal.h | 2 + tools/libxl/libxl_pci.c | 124 +++++++++++++++++++++++++++++++++++ tools/libxl/libxl_types.idl | 6 ++ tools/libxl/xl_cmdimpl.c | 14 +++- 7 files changed, 223 insertions(+), 10 deletions(-)
Thanks
Tiejun
PATCH v4 1/2 libxl: introduce libxl__is_igd_vga_passthru
While working with qemu, IGD is a specific device in the case of pass through so we need to identify that to handle more later. Here we define a table to record all IGD types currently we can support. Also we need to introduce two helper functions to get vendor and device ids to lookup that table.
--- tools/libxl/libxl_internal.h | 2 + tools/libxl/libxl_pci.c | 124 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 126 insertions(+)
tools/libxl/libxl_internal.h +2 -0
@@ -1343,6 +1343,8 @@ _hidden int libxl__device_pci_add(libxl__gc *gc, uint32_t domid, libxl_device_pc _hidden int libxl__create_pci_backend(libxl__gc *gc, uint32_t domid,libxl_device_pci *pcidev,int num); _hidden int libxl__device_pci_destroy_all(libxl__gc *gc, uint32_t domid); +_hidden bool libxl__is_igd_vga_passthru(libxl__gc *gc, +const libxl_domain_config *d_config);/* from libxl_dtdev */
tools/libxl/libxl_pci.c +124 -0
130 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v4 1/2 libxl: introduce libxl__is_igd_vga_passthru
In reply to Tiejun ChenWhile working with qemu, IGD is a specific device in the case of pass through so we need to identify that to handle more later. Here we define a table to record all IGD types currently we can support. Also we need to introduce two helper functions to get vendor and device ids to lookup that table.
--- tools/libxl/libxl_internal.h | 2 + tools/libxl/libxl_pci.c | 124 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 126 insertions(+)
tools/libxl/libxl_internal.h +2 -0
@@ -1343,6 +1343,8 @@ _hidden int libxl__device_pci_add(libxl__gc *gc, uint32_t domid, libxl_device_pc _hidden int libxl__create_pci_backend(libxl__gc *gc, uint32_t domid,libxl_device_pci *pcidev,int num); _hidden int libxl__device_pci_destroy_all(libxl__gc *gc, uint32_t domid); +_hidden bool libxl__is_igd_vga_passthru(libxl__gc *gc, +const libxl_domain_config *d_config);/* from libxl_dtdev */
tools/libxl/libxl_pci.c +124 -0
130 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v4 2/2 libxl: introduce gfx_passthru_kind
In reply to Tiejun ChenAlthough we already have 'gfx_passthru' in b_info, this doesn't suffice after we want to handle IGD specifically. Now we define a new field of type, gfx_passthru_kind, to indicate we're trying to pass IGD. Actually this means we can benefit this to support other specific devices just by extending gfx_passthru_kind. And then we can cooperate with gfx_passthru to address IGD cases as follows:
gfx_passthru = 0 => sets build_info.u.gfx_passthru to false
gfx_passthru = 1 => sets build_info.u.gfx_passthru to true and
build_info.u.gfx_passthru_kind to DEFAULT
gfx_passthru = "igd" => sets build_info.u.gfx_passthru to true
and build_info.u.gfx_passthru_kind to IGD
Here if gfx_passthru_kind = DEFAULT, we will call libxl__is_igd_vga_passthru() to check if we're hitting that table to need to pass that option to qemu. But if gfx_passthru_kind = "igd" we always force to pass that.
And "-gfx_passthru" is just introduced to work for qemu-xen-traditional so we should get this away from libxl__build_device_model_args_new() in the case of qemu upstream.
--- docs/man/xl.cfg.pod.5 | 35 ++++++++++++++++++++++++++++++---- tools/libxl/libxl.h | 6 ++++++ tools/libxl/libxl_dm.c | 46 +++++++++++++++++++++++++++++++++++++++++---- tools/libxl/libxl_types.idl | 6 ++++++ tools/libxl/xl_cmdimpl.c | 14 ++++++++++++-- 5 files changed, 97 insertions(+), 10 deletions(-)
docs/man/xl.cfg.pod.5 +31 -4
@@ -812,7 +812,7 @@ through to this VM. See L<seize|/"seize_boolean"> above. devices passed through to this VM. See L<power_mgt|/"power_mgmt_boolean"> above. -=item B<gfx_passthru=BOOLEAN> +=item B<gfx_passthru=BOOLEAN|"STRING"> Enable graphics device PCI passthrough. This option makes an assigned PCI graphics card become primary graphics card in the VM. The QEMU
@@ -840,9 +840,36 @@ working graphics passthrough. See the XenVGAPassthroughTestedAdapters L<http://wiki.xen.org/wiki/XenVGAPassthroughTestedAdapters> wiki page for currently supported graphics cards for gfx_passthru. -gfx_passthru is currently only supported with the qemu-xen-traditional -device-model. Upstream qemu-xen device-model currently does not have -support for gfx_passthru. +gfx_passthru is currently supported both with the qemu-xen-traditional +device-model and upstream qemu-xen device-model. + +When given as a boolean the B<gfx_passthru> option either disables gfx +passthru or enables autodetection. + +But when given as a string the B<gfx_passthru> option describes the type +of device to enable. Note this behavior is only supported with the upstream +qemu-xen device-model. With qemu-xen-traditional IGD is always assumed +and other options than autodetect or explicit IGD will result in an error. + +Currently, valid options are: + +=over 4 + +=item B<gfx_passthru=0> + +Disables graphics device PCI passthrough. + +=item B<gfx_passthru=1>, B<gfx_passthru="default"> + +Enables graphics device PCI passthrough and autodetects the type of device +which is being used. + +=item "igd" + +Enables graphics device PCI passthrough but forcing the type of device to +Intel Graphics Device. + +=back Note that some graphics adapters (AMD/ATI cards, for example) do not necessarily require gfx_passthru option, so you can use the normal Xen
tools/libxl/libxl.h +6 -0
@@ -832,6 +832,12 @@ void libxl_mac_copy(libxl_ctx *ctx, libxl_mac *dst, libxl_mac *src);*/ #define LIBXL_HAVE_SRM_V1 1 +/* +* libxl_domain_build_info has the u.hvm.gfx_passthru_kind field and +* the libxl_gfx_passthru_kind enumeration is defined. +*/ +#define LIBXL_HAVE_GFX_PASSTHRU_KIND +typedef char **libxl_string_list ;void libxl_string_list_dispose (libxl_string_list *sl);int libxl_string_list_length (const libxl_string_list *sl);
tools/libxl/libxl_dm.c +42 -4
70 lines not on this page · raw message
tools/libxl/libxl_types.idl +6 -0
@@ -157,6 +157,11 @@ libxl_tsc_mode = Enumeration("tsc_mode", [ (3, "native_paravirt"), ]) +libxl_gfx_passthru_kind = Enumeration("gfx_passthru_kind", [ + (0, "default"), + (1, "igd"), + ]) + # Consistent with the values defined for HVM_PARAM_TIMER_MODE. libxl_timer_mode = Enumeration("timer_mode", [ (-1, "unknown"),
@@ -488,6 +493,7 @@ libxl_domain_build_info = Struct("domain_build_info",[ ("spice", libxl_spice_info), ("gfx_passthru", libxl_defbool), + ("gfx_passthru_kind", libxl_gfx_passthru_kind), ("serial", string), ("boot", string),
tools/libxl/xl_cmdimpl.c +12 -2
@@ -2295,8 +2295,18 @@ skip_vfb:xlu_cfg_replace_string (config,"spice_streaming_video" , &b_info->u.hvm.spice.streaming_video,0 );xlu_cfg_get_defbool (config,"nographic" , &b_info->u.hvm.nographic,0 ); -xlu_cfg_get_defbool (config,"gfx_passthru" , - &b_info->u.hvm.gfx_passthru,0 ); +if (!xlu_cfg_get_long (config,"gfx_passthru" , &l,1 )) { +libxl_defbool_set (&b_info->u.hvm.gfx_passthru, l); + }else if (!xlu_cfg_get_string (config,"gfx_passthru" , &buf,0 )) { +if (libxl_gfx_passthru_kind_from_string (buf, + &b_info->u.hvm.gfx_passthru_kind)) { +fprintf (stderr, +"ERROR: invalid value \"%s\" for \"gfx_passthru\"\n" , + buf); +exit (1 ); + } +libxl_defbool_set (&b_info->u.hvm.gfx_passthru, true); + } switch (xlu_cfg_get_list_as_string_list(config, "serial", &b_info->u.hvm.serial_list, 1))
Signature · 1 line
1.9.1
PATCH v4 2/2 libxl: introduce gfx_passthru_kind
In reply to Tiejun ChenAlthough we already have 'gfx_passthru' in b_info, this doesn't suffice after we want to handle IGD specifically. Now we define a new field of type, gfx_passthru_kind, to indicate we're trying to pass IGD. Actually this means we can benefit this to support other specific devices just by extending gfx_passthru_kind. And then we can cooperate with gfx_passthru to address IGD cases as follows:
gfx_passthru = 0 => sets build_info.u.gfx_passthru to false
gfx_passthru = 1 => sets build_info.u.gfx_passthru to true and
build_info.u.gfx_passthru_kind to DEFAULT
gfx_passthru = "igd" => sets build_info.u.gfx_passthru to true
and build_info.u.gfx_passthru_kind to IGD
Here if gfx_passthru_kind = DEFAULT, we will call libxl__is_igd_vga_passthru() to check if we're hitting that table to need to pass that option to qemu. But if gfx_passthru_kind = "igd" we always force to pass that.
And "-gfx_passthru" is just introduced to work for qemu-xen-traditional so we should get this away from libxl__build_device_model_args_new() in the case of qemu upstream.
--- docs/man/xl.cfg.pod.5 | 35 ++++++++++++++++++++++++++++++---- tools/libxl/libxl.h | 6 ++++++ tools/libxl/libxl_dm.c | 46 +++++++++++++++++++++++++++++++++++++++++---- tools/libxl/libxl_types.idl | 6 ++++++ tools/libxl/xl_cmdimpl.c | 14 ++++++++++++-- 5 files changed, 97 insertions(+), 10 deletions(-)
docs/man/xl.cfg.pod.5 +31 -4
@@ -812,7 +812,7 @@ through to this VM. See L<seize|/"seize_boolean"> above. devices passed through to this VM. See L<power_mgt|/"power_mgmt_boolean"> above. -=item B<gfx_passthru=BOOLEAN> +=item B<gfx_passthru=BOOLEAN|"STRING"> Enable graphics device PCI passthrough. This option makes an assigned PCI graphics card become primary graphics card in the VM. The QEMU
@@ -840,9 +840,36 @@ working graphics passthrough. See the XenVGAPassthroughTestedAdapters L<http://wiki.xen.org/wiki/XenVGAPassthroughTestedAdapters> wiki page for currently supported graphics cards for gfx_passthru. -gfx_passthru is currently only supported with the qemu-xen-traditional -device-model. Upstream qemu-xen device-model currently does not have -support for gfx_passthru. +gfx_passthru is currently supported both with the qemu-xen-traditional +device-model and upstream qemu-xen device-model. + +When given as a boolean the B<gfx_passthru> option either disables gfx +passthru or enables autodetection. + +But when given as a string the B<gfx_passthru> option describes the type +of device to enable. Note this behavior is only supported with the upstream +qemu-xen device-model. With qemu-xen-traditional IGD is always assumed +and other options than autodetect or explicit IGD will result in an error. + +Currently, valid options are: + +=over 4 + +=item B<gfx_passthru=0> + +Disables graphics device PCI passthrough. + +=item B<gfx_passthru=1>, B<gfx_passthru="default"> + +Enables graphics device PCI passthrough and autodetects the type of device +which is being used. + +=item "igd" + +Enables graphics device PCI passthrough but forcing the type of device to +Intel Graphics Device. + +=back Note that some graphics adapters (AMD/ATI cards, for example) do not necessarily require gfx_passthru option, so you can use the normal Xen
tools/libxl/libxl.h +6 -0
@@ -832,6 +832,12 @@ void libxl_mac_copy(libxl_ctx *ctx, libxl_mac *dst, libxl_mac *src);*/ #define LIBXL_HAVE_SRM_V1 1 +/* +* libxl_domain_build_info has the u.hvm.gfx_passthru_kind field and +* the libxl_gfx_passthru_kind enumeration is defined. +*/ +#define LIBXL_HAVE_GFX_PASSTHRU_KIND +typedef char **libxl_string_list ;void libxl_string_list_dispose (libxl_string_list *sl);int libxl_string_list_length (const libxl_string_list *sl);
tools/libxl/libxl_dm.c +42 -4
70 lines not on this page · raw message
tools/libxl/libxl_types.idl +6 -0
@@ -157,6 +157,11 @@ libxl_tsc_mode = Enumeration("tsc_mode", [ (3, "native_paravirt"), ]) +libxl_gfx_passthru_kind = Enumeration("gfx_passthru_kind", [ + (0, "default"), + (1, "igd"), + ]) + # Consistent with the values defined for HVM_PARAM_TIMER_MODE. libxl_timer_mode = Enumeration("timer_mode", [ (-1, "unknown"),
@@ -488,6 +493,7 @@ libxl_domain_build_info = Struct("domain_build_info",[ ("spice", libxl_spice_info), ("gfx_passthru", libxl_defbool), + ("gfx_passthru_kind", libxl_gfx_passthru_kind), ("serial", string), ("boot", string),
tools/libxl/xl_cmdimpl.c +12 -2
@@ -2295,8 +2295,18 @@ skip_vfb:xlu_cfg_replace_string (config,"spice_streaming_video" , &b_info->u.hvm.spice.streaming_video,0 );xlu_cfg_get_defbool (config,"nographic" , &b_info->u.hvm.nographic,0 ); -xlu_cfg_get_defbool (config,"gfx_passthru" , - &b_info->u.hvm.gfx_passthru,0 ); +if (!xlu_cfg_get_long (config,"gfx_passthru" , &l,1 )) { +libxl_defbool_set (&b_info->u.hvm.gfx_passthru, l); + }else if (!xlu_cfg_get_string (config,"gfx_passthru" , &buf,0 )) { +if (libxl_gfx_passthru_kind_from_string (buf, + &b_info->u.hvm.gfx_passthru_kind)) { +fprintf (stderr, +"ERROR: invalid value \"%s\" for \"gfx_passthru\"\n" , + buf); +exit (1 ); + } +libxl_defbool_set (&b_info->u.hvm.gfx_passthru, true); + } switch (xlu_cfg_get_list_as_string_list(config, "serial", &b_info->u.hvm.serial_list, 1))
Signature · 1 line
1.9.1
Re: [v4][PATCH 2/2] libxl: introduce gfx_passthru_kind
Quoted 18 lines · Tiejun Chen
Although we already have '
gfx_passthru' inb_info, this doesn't suffice after we want to handle IGD specifically. Now we define a new field of type,gfx_passthru_kind, to indicate we're trying to pass IGD. Actually this means we can benefit this to support other specific devices just by extendinggfx_passthru_kind. And then we can cooperate withgfx_passthruto address IGD cases as follows:
gfx_passthru= 0 => sets build_info.u.gfx_passthru to false
gfx_passthru= 1 => sets build_info.u.gfx_passthru to true and
build_info.u.gfx_passthru_kind to DEFAULT
gfx_passthru= "igd" => sets build_info.u.gfx_passthru to true
and build_info.u.gfx_passthru_kind to IGDHere if
gfx_passthru_kind= DEFAULT, we will calllibxl__is_igd_vga_passthru()to check if we're hitting that table to need to pass that option to qemu. But ifgfx_passthru_kind= "igd" we always force to pass that.
Quoted 5 lines
And "-gfx_passthru" is just introduced to work for qemu-xen-traditional so we should get this away from
libxl__build_device_model_args_new()in the case of qemu upstream.Signed-off-by Tiejun Chen <[email protected]>
Acked + applied both patches, thanks.
Stefano -- are the QEMU side patches in qemu-upstream-unstable.git yet? If not I suppose this is a call/reminder to backport them from mainline or whatever.
Ian.
Re: [Qemu-devel] [v4][PATCH 2/2] libxl: introduce gfx_passthru_kind
In reply to Tiejun ChenQuoted 18 lines · Tiejun Chen
Although we already have '
gfx_passthru' inb_info, this doesn't suffice after we want to handle IGD specifically. Now we define a new field of type,gfx_passthru_kind, to indicate we're trying to pass IGD. Actually this means we can benefit this to support other specific devices just by extendinggfx_passthru_kind. And then we can cooperate withgfx_passthruto address IGD cases as follows:
gfx_passthru= 0 => sets build_info.u.gfx_passthru to false
gfx_passthru= 1 => sets build_info.u.gfx_passthru to true and
build_info.u.gfx_passthru_kind to DEFAULT
gfx_passthru= "igd" => sets build_info.u.gfx_passthru to true
and build_info.u.gfx_passthru_kind to IGDHere if
gfx_passthru_kind= DEFAULT, we will calllibxl__is_igd_vga_passthru()to check if we're hitting that table to need to pass that option to qemu. But ifgfx_passthru_kind= "igd" we always force to pass that.
Quoted 5 lines
And "-gfx_passthru" is just introduced to work for qemu-xen-traditional so we should get this away from
libxl__build_device_model_args_new()in the case of qemu upstream.Signed-off-by Tiejun Chen <[email protected]>
Acked + applied both patches, thanks.
Stefano -- are the QEMU side patches in qemu-upstream-unstable.git yet? If not I suppose this is a call/reminder to backport them from mainline or whatever.
Ian.
Re: [Qemu-devel] [v4][PATCH 2/2] libxl: introduce gfx_passthru_kind
Quoted 23 lines · Ian Campbell
Quoted 22 lines · Tiejun Chen
Although we already have '
gfx_passthru' inb_info, this doesn't suffice after we want to handle IGD specifically. Now we define a new field of type,gfx_passthru_kind, to indicate we're trying to pass IGD. Actually this means we can benefit this to support other specific devices just by extendinggfx_passthru_kind. And then we can cooperate withgfx_passthruto address IGD cases as follows:
gfx_passthru= 0 => sets build_info.u.gfx_passthru to false
gfx_passthru= 1 => sets build_info.u.gfx_passthru to true and
build_info.u.gfx_passthru_kind to DEFAULT
gfx_passthru= "igd" => sets build_info.u.gfx_passthru to true
and build_info.u.gfx_passthru_kind to IGDHere if
gfx_passthru_kind= DEFAULT, we will calllibxl__is_igd_vga_passthru()to check if we're hitting that table to need to pass that option to qemu. But ifgfx_passthru_kind= "igd" we always force to pass that.And "-gfx_passthru" is just introduced to work for qemu-xen-traditional so we should get this away from
libxl__build_device_model_args_new()in the case of qemu upstream.
Quoted 7 lines
Quoted 1 line
Signed-off-by Tiejun Chen <[email protected]>Acked + applied both patches, thanks.
Stefano -- are the QEMU side patches in qemu-upstream-unstable.git yet? If not I suppose this is a call/reminder to backport them from mainline or whatever.
No, they are not, they'll be in qemu-upstream for Xen 4.7.
Ping...
Thanks
Tiejun
Quoted 75 lines · Tiejun Chen
Ian,
As we discussed previously,
http://patchwork.ozlabs.org/patch/457055/
now it's time to push this into on xen/tools side since all qemu stuffs have been merged.
https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg02094.html
v4:
Ian,
Actually we had v3.5 online previously, which was reviewed by you.
http://permalink.gmane.org/gmane.comp.emulators.qemu/329100
So here I just bring a little bit to refine code just for patch #2 according to out last conversation.
v3:
* Refine some codes based on Campbell's feedback so thanks for Campbell's kind guideline to patch #2
* Update the manpages in patch #2v2:
* Refine patch #2's head description
* Improve codes quality inside patch #1 based on Wei's comments
* Refill the summary inside patch #0 based on Konrad and Wei's suggestionWhen 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,igd-passthru=on".
https://lists.nongnu.org/archive/html/qemu-devel/2015-01/msg02050.html
This need to bring a change on tool side.
After a discussion with Campbell, we'd like to construct a table to record all IGD devices we can support. If we hit that table, we should pass that option. And so we also introduce a new field of type, '
gfx_passthru_kind', to cooperate with 'gfx_passthru' to cover all scenarios like this,
gfx_passthru= 0 => sets build_info.u.gfx_passthru to false
gfx_passthru= 1 => sets build_info.u.gfx_passthru to true and
build_info.u.gfx_passthru_kind to DEFAULT
gfx_passthru= "igd" => sets build_info.u.gfx_passthru to false
and build_info.u.gfx_passthru_kind to IGDAnd note actually that option "-gfx_passthru" is just introduced to work for qemu-xen-traditional so we should get this away from
libxl__build_device_model_args_new()in the case of qemu upstream.----------------------------------------------------------------
Tiejun Chen (2):
libxl: introducelibxl__is_igd_vga_passthru
libxl: introducegfx_passthru_kinddocs/man/xl.cfg.pod.5 | 35 ++++++++-- tools/libxl/libxl.h | 6 ++ tools/libxl/libxl_dm.c | 46 +++++++++++-- tools/libxl/libxl_internal.h | 2 + tools/libxl/libxl_pci.c | 124 +++++++++++++++++++++++++++++++++++ tools/libxl/libxl_types.idl | 6 ++ tools/libxl/xl_cmdimpl.c | 14 +++- 7 files changed, 223 insertions(+), 10 deletions(-)Thanks
Tiejun
Ping...
Thanks
Tiejun
Quoted 75 lines · Tiejun Chen
Ian,
As we discussed previously,
http://patchwork.ozlabs.org/patch/457055/
now it's time to push this into on xen/tools side since all qemu stuffs have been merged.
https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg02094.html
v4:
Ian,
Actually we had v3.5 online previously, which was reviewed by you.
http://permalink.gmane.org/gmane.comp.emulators.qemu/329100
So here I just bring a little bit to refine code just for patch #2 according to out last conversation.
v3:
* Refine some codes based on Campbell's feedback so thanks for Campbell's kind guideline to patch #2
* Update the manpages in patch #2v2:
* Refine patch #2's head description
* Improve codes quality inside patch #1 based on Wei's comments
* Refill the summary inside patch #0 based on Konrad and Wei's suggestionWhen 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,igd-passthru=on".
https://lists.nongnu.org/archive/html/qemu-devel/2015-01/msg02050.html
This need to bring a change on tool side.
After a discussion with Campbell, we'd like to construct a table to record all IGD devices we can support. If we hit that table, we should pass that option. And so we also introduce a new field of type, '
gfx_passthru_kind', to cooperate with 'gfx_passthru' to cover all scenarios like this,
gfx_passthru= 0 => sets build_info.u.gfx_passthru to false
gfx_passthru= 1 => sets build_info.u.gfx_passthru to true and
build_info.u.gfx_passthru_kind to DEFAULT
gfx_passthru= "igd" => sets build_info.u.gfx_passthru to false
and build_info.u.gfx_passthru_kind to IGDAnd note actually that option "-gfx_passthru" is just introduced to work for qemu-xen-traditional so we should get this away from
libxl__build_device_model_args_new()in the case of qemu upstream.----------------------------------------------------------------
Tiejun Chen (2):
libxl: introducelibxl__is_igd_vga_passthru
libxl: introducegfx_passthru_kinddocs/man/xl.cfg.pod.5 | 35 ++++++++-- tools/libxl/libxl.h | 6 ++ tools/libxl/libxl_dm.c | 46 +++++++++++-- tools/libxl/libxl_internal.h | 2 + tools/libxl/libxl_pci.c | 124 +++++++++++++++++++++++++++++++++++ tools/libxl/libxl_types.idl | 6 ++ tools/libxl/xl_cmdimpl.c | 14 +++- 7 files changed, 223 insertions(+), 10 deletions(-)Thanks
Tiejun