libxl: upstream Qemu as PV backend for IOEMU stubdom
cover libxl: upstream Qemu as PV backend for IOEMU stubdom
This patch adds support for choosing upstream QEMU as the PV QEMU backend for an IOEMU stubdom instead of qemu-xen-traditional. The motivation is to expose QEMU features only available in upstream like VNC auth options.
It adds a new xl.cfg file parameter named device_model_pv_version taking the same values as device_model_version. I made the choice configurable as upstream QEMU requires more RAM than qemu-xen-traditional.
This patch was prompted by guidance from Ian when my SASL patch to qemu-xen-trad was deemed too complicated.
libxl/libxl_dm.c | 6 ++++-- libxl/libxl_types.idl | 1 + xl/xl_parse.c | 19 +++++++++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-)
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
RFC PATCH 1/3 libxl: upstream Qemu as PV backend for IOEMU stubdom
Add new domain build setting recording the chosen version of PV Qemu backend for an IOEMU stubdom.
--- tools/libxl/libxl_types.idl | 1 + 1 file changed, 1 insertion(+)
tools/libxl/libxl_types.idl +1 -0
@@ -474,6 +474,7 @@ libxl_domain_build_info = Struct("domain_build_info",[ ("vnuma_nodes", Array(libxl_vnode_info, "num_vnuma_nodes")), ("device_model_version", libxl_device_model_version), + ("device_model_pv_version", libxl_device_model_version), ("device_model_stubdomain", libxl_defbool), # if you set device_model you must set device_model_version too ("device_model", string),
Signature · 7 lines
2.7.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
RFC PATCH 2/3 libxl: upstream Qemu as PV backend for IOEMU stubdom
In reply to Simon WatermanProcess xl.cfg file setting for PV device model version. Valid values are qemu-xen and qemu-xen-traditional.
--- tools/xl/xl_parse.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
tools/xl/xl_parse.c +19 -0
@@ -1883,6 +1883,25 @@ skip_usbdev:xlu_cfg_replace_string (config,"device_model_user" , &b_info->device_model_user,0 ); +if (!xlu_cfg_get_string (config,"device_model_pv_version" , &buf,0 )) { +if (!libxl_defbool_val (b_info->device_model_stubdomain)) { +fprintf (stderr,"WARNING: device_model_pv_version specified but no stub domain\n" ); + } +if (!strcmp (buf,"qemu-xen-traditional" )) { + b_info->device_model_pv_version + =LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL ; + }else if (!strcmp (buf,"qemu-xen" )) { + b_info->device_model_pv_version + =LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN ; + }else { +fprintf (stderr, +"Unknown device_model_pv_version \"%s\" specified\n" , buf); +exit (1 ); + } + }else + b_info->device_model_pv_version + =LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL ; +#define parse_extra_args (type) \ e = xlu_cfg_get_list_as_string_list(config, "device_model_args"#type, \ &b_info->extra##type, 0); \
Signature · 7 lines
2.7.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
RFC PATCH 3/3 libxl: upstream Qemu as PV backend for IOEMU stubdom
In reply to Simon WatermanSet the PV model version for the IOEMU stubdom from the new device_model_pv_version setting. Existing code sets up the command line and spawns the specified version correctly.
In addition, the upstream QEMU doesn't allow the restore console to be undefined (it SEGV's) so if this is not a restore set it to "null" instead. This has the same affect on both upstream QEMU and qemu-xen-traditional.
--- tools/libxl/libxl_dm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
tools/libxl/libxl_dm.c +4 -2
@@ -1847,8 +1847,8 @@ void libxl__spawn_stub_dm(libxl__egc *egc, libxl__stub_dm_spawn_state *sdss) dm_config->b_info.u.pv.features ="" ; - dm_config->b_info.device_model_version = - guest_config->b_info.device_model_version; + dm_config->b_info.device_model_version = + guest_config->b_info.device_model_pv_version; dm_config->b_info.device_model = guest_config->b_info.device_model; dm_config->b_info.extra = guest_config->b_info.extra;
@@ -2014,6 +2014,8 @@ static void spawn_stub_launch_dm(libxl__egc *egc,if (d_state->saved_state) console[i].output =GCSPRINTF ("pipe:%s" , d_state->saved_state); +else + console[i].output ="null" ;break ;default : console[i].output ="pty" ;
Signature · 7 lines
2.7.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 9 lines · Simon Waterman
This patch adds support for choosing upstream QEMU as the PV QEMU backend for an IOEMU stubdom instead of qemu-xen-traditional. The motivation is to expose QEMU features only available in upstream like VNC auth options.
It adds a new xl.cfg file parameter named
device_model_pv_versiontaking the same values asdevice_model_version. I made the choice configurable as upstream QEMU requires more RAM than qemu-xen-traditional.
How much more?
I am not very interested in supporting two modes TBH.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel