diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2012-01-31 15:21:52 +0000 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2012-01-31 15:21:52 +0000 |
commit | 88ac62eb7c3d7c449895fa5c9f95858bfac99ebc (patch) | |
tree | 6a8738e458dde59835d78ab18c6fe2fd0ebae2a5 | |
parent | 9f0f013b7e5b4c604e6f018dc41ddadd3c6ab976 (diff) | |
download | xen-88ac62eb7c3d7c449895fa5c9f95858bfac99ebc.tar.gz xen-88ac62eb7c3d7c449895fa5c9f95858bfac99ebc.tar.bz2 xen-88ac62eb7c3d7c449895fa5c9f95858bfac99ebc.zip |
libxl: move gfx_passthru setting to b_info->u.hvm
Although xl parsed this value for both PV and HVM domains (and then a second
time for HVM domains) inside libxl it only impacts HVM guests so I think this
is the right place for it.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
-rw-r--r-- | tools/libxl/libxl_dm.c | 4 | ||||
-rw-r--r-- | tools/libxl/libxl_types.idl | 3 | ||||
-rw-r--r-- | tools/libxl/xl_cmdimpl.c | 7 |
3 files changed, 6 insertions, 8 deletions
diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index 84dedc2ab4..bf01806a18 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -240,7 +240,7 @@ static char ** libxl__build_device_model_args_old(libxl__gc *gc, if ( ioemu_vifs == 0 ) { flexarray_vappend(dm_args, "-net", "none", NULL); } - if (info->gfx_passthru) { + if (b_info->u.hvm.gfx_passthru) { flexarray_append(dm_args, "-gfx_passthru"); } } else { @@ -480,7 +480,7 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc, flexarray_append(dm_args, "-net"); flexarray_append(dm_args, "none"); } - if (info->gfx_passthru) { + if (b_info->u.hvm.gfx_passthru) { flexarray_append(dm_args, "-gfx_passthru"); } } else { diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl index 58b303c763..0947dbd140 100644 --- a/tools/libxl/libxl_types.idl +++ b/tools/libxl/libxl_types.idl @@ -223,6 +223,8 @@ libxl_domain_build_info = Struct("domain_build_info",[ ("sdl", libxl_sdl_info), ("spice", libxl_spice_info), + ("gfx_passthru", bool), + ("serial", string), ("boot", string), ("usb", bool), @@ -260,7 +262,6 @@ libxl_device_model_info = Struct("device_model_info",[ ("device_model", string), ("saved_state", string), ("type", libxl_domain_type), - ("gfx_passthru", bool), # extra parameters pass directly to qemu, NULL terminated ("extra", libxl_string_list), # extra parameters pass directly to qemu for PV guest, NULL terminated diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 2589244e0a..3e98f68965 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -382,7 +382,7 @@ static void printf_info(int domid, printf("\t\t\t(spiceagent_mouse %d)\n", b_info->u.hvm.spice.agent_mouse); printf("\t\t\t(device_model %s)\n", dm_info->device_model ? : "default"); - printf("\t\t\t(gfx_passthru %d)\n", dm_info->gfx_passthru); + printf("\t\t\t(gfx_passthru %d)\n", b_info->u.hvm.gfx_passthru); printf("\t\t\t(serial %s)\n", b_info->u.hvm.serial); printf("\t\t\t(boot %s)\n", b_info->u.hvm.boot); printf("\t\t\t(usb %d)\n", b_info->u.hvm.usb); @@ -816,9 +816,6 @@ static void parse_config_data(const char *configfile_filename_report, if (!xlu_cfg_get_long (config, "videoram", &l, 0)) b_info->video_memkb = l * 1024; - if (!xlu_cfg_get_long (config, "gfx_passthru", &l, 0)) - dm_info->gfx_passthru = l; - switch(c_info->type) { case LIBXL_DOMAIN_TYPE_HVM: if (!xlu_cfg_get_string (config, "kernel", &buf, 0)) @@ -1292,7 +1289,7 @@ skip_vfb: if (!xlu_cfg_get_long (config, "nographic", &l, 0)) b_info->u.hvm.nographic = l; if (!xlu_cfg_get_long (config, "gfx_passthru", &l, 0)) - dm_info->gfx_passthru = l; + b_info->u.hvm.gfx_passthru = l; xlu_cfg_replace_string (config, "serial", &b_info->u.hvm.serial, 0); xlu_cfg_replace_string (config, "boot", &b_info->u.hvm.boot, 0); if (!xlu_cfg_get_long (config, "usb", &l, 0)) |