[PATCH v2 2/2] [Security Check] Remove the old parameters

fred gao fred.gao at intel.com
Fri Sep 29 08:48:24 UTC 2017


With the introduction of sysfsdevice parameter, the old parameters
such as vgt_{low, high}_gm_sz, vgt_fenc_sz, vgt_primary are no
longer use.

v2:
- remove the old parameters. (Zhang, xiong)

Signed-off-by: fred gao <fred.gao at intel.com>
---
 tools/libxl/libxl_dm.c      | 32 --------------------------------
 tools/libxl/libxl_types.idl |  4 ----
 tools/xl/xl_parse.c         | 10 ----------
 3 files changed, 46 deletions(-)

diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index 1e1c336..241cc55 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -540,22 +540,6 @@ static int libxl__build_device_model_args_old(libxl__gc *gc,
 
         if (libxl_defbool_val(b_info->u.hvm.vgt)) {
             flexarray_vappend(dm_args, "-vga", "xengt", NULL);
-            if (b_info->u.hvm.vgt_low_gm_sz) {
-                flexarray_vappend(dm_args, "-vga_low_gm_sz",
-                    libxl__sprintf(gc, "%d", b_info->u.hvm.vgt_low_gm_sz), NULL);
-            }
-            if (b_info->u.hvm.vgt_high_gm_sz) {
-                flexarray_vappend(dm_args, "-vgt_high_gm_sz",
-                    libxl__sprintf(gc, "%d", b_info->u.hvm.vgt_high_gm_sz), NULL);
-            }
-            if (b_info->u.hvm.vgt_fence_sz) {
-                flexarray_vappend(dm_args, "-vgt_fenc_sz",
-                    libxl__sprintf(gc, "%d", b_info->u.hvm.vgt_fence_sz), NULL);
-            }
-            if (b_info->u.hvm.vgt_primary != -1) {
-                flexarray_vappend(dm_args, "-vgt_primary",
-                    libxl__sprintf(gc, "%d", b_info->u.hvm.vgt_primary), NULL);
-            }
             if (b_info->u.hvm.vgt_monitor_config_file) {
                 flexarray_vappend(dm_args, "-vgt_monitor_config_file",
                     libxl__sprintf(gc, "%s", b_info->u.hvm.vgt_monitor_config_file), NULL);
@@ -1150,22 +1134,6 @@ static int libxl__build_device_model_args_new(libxl__gc *gc,
         /* TODO: some vga options are exclusive */
         if (libxl_defbool_val(b_info->u.hvm.vgt)) {
             flexarray_vappend(dm_args, "-vga", "xengt", NULL);
-            if (b_info->u.hvm.vgt_low_gm_sz) {
-                flexarray_vappend(dm_args, "-vgt_low_gm_sz",
-                    libxl__sprintf(gc, "%d", b_info->u.hvm.vgt_low_gm_sz), NULL);
-            }
-            if (b_info->u.hvm.vgt_high_gm_sz) {
-                flexarray_vappend(dm_args, "-vgt_high_gm_sz",
-                    libxl__sprintf(gc, "%d", b_info->u.hvm.vgt_high_gm_sz), NULL);
-            }
-            if (b_info->u.hvm.vgt_fence_sz) {
-                flexarray_vappend(dm_args, "-vgt_fence_sz",
-                    libxl__sprintf(gc, "%d", b_info->u.hvm.vgt_fence_sz), NULL);
-            }
-            if (b_info->u.hvm.vgt_primary != -1) {
-                flexarray_vappend(dm_args, "-vgt_primary",
-                    libxl__sprintf(gc, "%d", b_info->u.hvm.vgt_primary), NULL);
-            }
             if (b_info->u.hvm.vgt_monitor_config_file) {
                 flexarray_vappend(dm_args, "-vgt_monitor_config_file",
                     libxl__sprintf(gc, "%s", b_info->u.hvm.vgt_monitor_config_file), NULL);
diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
index ac28186..6de9db0 100644
--- a/tools/libxl/libxl_types.idl
+++ b/tools/libxl/libxl_types.idl
@@ -540,10 +540,6 @@ libxl_domain_build_info = Struct("domain_build_info",[
                                        ("nographic",        libxl_defbool),
                                        ("vga",              libxl_vga_interface_info),
                                        ("vgt",              libxl_defbool),
-                                       ("vgt_low_gm_sz",    VgtInt),
-                                       ("vgt_high_gm_sz",   VgtInt),
-                                       ("vgt_fence_sz",     VgtInt),
-                                       ("vgt_primary",      VgtInt),
                                        ("vgt_monitor_config_file", string),
                                        ("sysfsdevice",      string),
                                        ("vnc",              libxl_vnc_info),
diff --git a/tools/xl/xl_parse.c b/tools/xl/xl_parse.c
index 5f85eed..c45ce57 100644
--- a/tools/xl/xl_parse.c
+++ b/tools/xl/xl_parse.c
@@ -1955,16 +1955,6 @@ skip_usbdev:
         }
 
         xlu_cfg_get_defbool(config, "vgt", &b_info->u.hvm.vgt, 0);
-        if (!xlu_cfg_get_long(config, "vgt_low_gm_sz", &l, 0))
-            b_info->u.hvm.vgt_low_gm_sz = l;
-        if (!xlu_cfg_get_long(config, "vgt_high_gm_sz", &l, 0))
-            b_info->u.hvm.vgt_high_gm_sz = l;
-        if (!xlu_cfg_get_long(config, "vgt_fence_sz", &l, 0))
-            b_info->u.hvm.vgt_fence_sz = l;
-        if (!xlu_cfg_get_long(config, "vgt_primary", &l, 0))
-            b_info->u.hvm.vgt_primary = l;
-        else
-            b_info->u.hvm.vgt_primary = -1; /* not specified */
         xlu_cfg_replace_string(config, "vgt_monitor_config_file", &b_info->u.hvm.vgt_monitor_config_file, 0);
         xlu_cfg_replace_string(config, "sysfsdevice", &b_info->u.hvm.sysfsdevice, 0);
 
-- 
2.7.4



More information about the intel-gvt-dev mailing list