[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] xl: Add 'pvh' config option
In addition to 'device_model_version="none"' config option users can also use 'pvh=1' in xl configuration file when creating a PVH guest. We can skip parsing options related to device model once we establish that we are building PVH guest. Also process 'device_model_version="none"' for HVM guests only since it is not a valid model for PV guests. Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> --- docs/man/xl.cfg.pod.5.in | 7 ++++++- tools/xl/xl_parse.c | 12 +++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/docs/man/xl.cfg.pod.5.in b/docs/man/xl.cfg.pod.5.in index 206d33e..5833987 100644 --- a/docs/man/xl.cfg.pod.5.in +++ b/docs/man/xl.cfg.pod.5.in @@ -1201,6 +1201,11 @@ expose unexpected bugs in the guest, or find bugs in Xen, so it is possible to disable this feature. Use of out of sync page tables, when Xen thinks it appropriate, is the default. +=item B<pvh=BOOLEAN> + +Don't use any device model. This requires a kernel capable of booting +without emulated devices. Default is 0. + =item B<shadow_memory=MBYTES> Number of megabytes to set aside for shadowing guest pagetable pages @@ -1966,7 +1971,7 @@ This device-model is still the default for NetBSD dom0. =item B<none> Don't use any device model. This requires a kernel capable of booting -without emulated devices. +without emulated devices. This is a synonym for L</"pvh"> option above. =back diff --git a/tools/xl/xl_parse.c b/tools/xl/xl_parse.c index 66327dc..aa591cd 100644 --- a/tools/xl/xl_parse.c +++ b/tools/xl/xl_parse.c @@ -1817,6 +1817,12 @@ skip_usbdev: break; } + if (c_info->type == LIBXL_DOMAIN_TYPE_HVM && + !xlu_cfg_get_long(config, "pvh", &l, 0) && l) { + b_info->device_model_version = LIBXL_DEVICE_MODEL_VERSION_NONE; + goto skip_device_model; + } + /* parse device model arguments, this works for pv, hvm and stubdom */ if (!xlu_cfg_get_string (config, "device_model", &buf, 0)) { fprintf(stderr, @@ -1845,8 +1851,10 @@ skip_usbdev: } else if (!strcmp(buf, "qemu-xen")) { b_info->device_model_version = LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN; - } else if (!strcmp(buf, "none")) { + } else if (c_info->type == LIBXL_DOMAIN_TYPE_HVM && + !strcmp(buf, "none")) { b_info->device_model_version = LIBXL_DEVICE_MODEL_VERSION_NONE; + goto skip_device_model; } else { fprintf(stderr, "Unknown device_model_version \"%s\" specified\n", buf); @@ -1884,6 +1892,8 @@ skip_usbdev: #undef parse_extra_args +skip_device_model: + /* If we've already got vfb=[] for PV guest then ignore top level * VNC config. */ if (c_info->type == LIBXL_DOMAIN_TYPE_PV && !d_config->num_vfbs) { -- 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |