]> xenbits.xensource.com Git - xen.git/commitdiff
xl: pvshim: Provide and document xl config
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 15 Jan 2018 12:22:28 +0000 (12:22 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 15 Jan 2018 15:51:18 +0000 (15:51 +0000)
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
v2: pvshim, not pvhshim
    works with type "pvh", not type "pv"
    pvshim_etc. options in config are not erroneously ignored

docs/man/xl.cfg.pod.5.in
tools/libxl/xl_cmdimpl.c

index d8b5fc74d517feaddaee850e74dea4062a3f45ba..a27ab0923718e1fc77b55da672d2661f457bf471 100644 (file)
@@ -506,6 +506,41 @@ Load the specified file as firmware for the guest.
 Currently there's no firmware available for PVH guests, they should be
 booted using the B<Direct Kernel Boot> method or the B<bootloader> option.
 
+=over 4
+
+=item B<pvshim=BOOLEAN>
+
+Whether to boot this guest as a PV guest within a PVH container.
+Ie, the guest will experience a PV environment,
+but
+processor hardware extensions are used to
+separate its address space
+to mitigate the Meltdown attack (CVE-2017-5754).
+
+Default is false.
+
+=item B<pvshim_path="PATH">
+
+The PV shim is a specially-built firmware-like executable
+constructed from the hypervisor source tree.
+This option specifies to use a non-default shim.
+Ignored if pvhsim is false.
+
+=item B<pvshim_cmdline="STRING">
+
+Command line for the shim.
+Default is "pv-shim console=xen,pv sched=null".
+Ignored if pvhsim is false.
+
+=item B<pvshim_extra="STRING">
+
+Extra command line arguments for the shim.
+If supplied, appended to the value for pvshim_cmdline.
+Default is empty.
+Ignored if pvhsim is false.
+
+=back
+
 =head3 Other Options
 
 =over 4
index 1bca1286d07688d9696fcf2ee79189e59516f3a8..9bd09fac59585c5a3d12b272ae0433a5e27e2e8c 100644 (file)
@@ -1433,6 +1433,19 @@ static void parse_config_data(const char *config_source,
     if (blkdev_start)
         b_info->blkdev_start = strdup(blkdev_start);
 
+    if (b_info->type == LIBXL_DOMAIN_TYPE_PVH) {
+        xlu_cfg_get_defbool(config, "pvshim", &b_info->u.pvh.pvshim, 0);
+        if (!xlu_cfg_get_string(config, "pvshim_path", &buf, 0))
+            xlu_cfg_replace_string(config, "pvshim_path",
+                                   &b_info->u.pvh.pvshim_path, 0);
+        if (!xlu_cfg_get_string(config, "pvshim_cmdline", &buf, 0))
+            xlu_cfg_replace_string(config, "pvshim_cmdline",
+                                   &b_info->u.pvh.pvshim_cmdline, 0);
+        if (!xlu_cfg_get_string(config, "pvshim_extra", &buf, 0))
+            xlu_cfg_replace_string(config, "pvshim_extra",
+                                   &b_info->u.pvh.pvshim_extra, 0);
+    }
+
     /* the following is the actual config parsing with overriding
      * values in the structures */
     if (!xlu_cfg_get_long (config, "cpu_weight", &l, 0))