[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v2 62/62] xl: Default guest mode changed from PV to PVH with PV shim



From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>

If the config file specifies a type (or builder), it overrides this
default.  But if it doesn't, you now get a PV-in-PVH guest.

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
v2: New patch
---
 tools/xl/xl_parse.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/tools/xl/xl_parse.c b/tools/xl/xl_parse.c
index fdfe693de1..2a53ac0015 100644
--- a/tools/xl/xl_parse.c
+++ b/tools/xl/xl_parse.c
@@ -939,8 +939,12 @@ void parse_config_data(const char *config_source,
         c_info->type = builder_type;
     }
 
-    if (c_info->type == LIBXL_DOMAIN_TYPE_INVALID)
-        c_info->type = LIBXL_DOMAIN_TYPE_PV;
+    static bool pvshim_default_enable = 0;
+
+    if (c_info->type == LIBXL_DOMAIN_TYPE_INVALID) {
+        c_info->type = LIBXL_DOMAIN_TYPE_PVH;
+        pvshim_default_enable = 1;
+    }
 
     xlu_cfg_get_defbool(config, "hap", &c_info->hap, 0);
 
@@ -966,7 +970,10 @@ void parse_config_data(const char *config_source,
     libxl_domain_build_info_init_type(b_info, c_info->type);
 
     if (b_info->type == LIBXL_DOMAIN_TYPE_PVH) {
-        xlu_cfg_get_defbool(config, "pvshim", &b_info->u.pvh.pvshim, 0);
+        if (xlu_cfg_get_defbool(config, "pvshim", &b_info->u.pvh.pvshim, 0)
+            && pvshim_default_enable)
+            libxl_defbool_set(&b_info->u.pvh.pvshim, 1);
+
         if (!xlu_cfg_get_string(config, "pvshim_path", &buf, 0))
             xlu_cfg_replace_string(config, "pvshim_path",
                                    &b_info->u.pvh.pvshim_path, 0);
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.