From: Roger Pau Monne <roger.pau@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Wei Liu <wei.liu2@citrix.com>,
boris.ostrovsky@oracle.com,
Roger Pau Monne <roger.pau@citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>
Subject: [PATCH 02/19] xl: introduce a domain type option
Date: Tue, 22 Aug 2017 10:49:03 +0100 [thread overview]
Message-ID: <20170822094920.70151-3-roger.pau@citrix.com> (raw)
In-Reply-To: <20170822094920.70151-1-roger.pau@citrix.com>
Introduce a new type option to xl configuration files in order to
specify the domain type. This supersedes the current builder option.
The new option is documented in the xl.cfg man page, and the previous
builder option is marked as deprecated.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
---
docs/man/xl.cfg.pod.5.in | 22 ++++++++++++++++++++--
tools/xl/xl_parse.c | 20 +++++++++++++++++---
2 files changed, 37 insertions(+), 5 deletions(-)
diff --git a/docs/man/xl.cfg.pod.5.in b/docs/man/xl.cfg.pod.5.in
index 79cb2eaea7..ab53436da2 100644
--- a/docs/man/xl.cfg.pod.5.in
+++ b/docs/man/xl.cfg.pod.5.in
@@ -54,9 +54,9 @@ Pairs may be separated either by a newline or a semicolon. Both
of the following are valid:
name="h0"
- builder="hvm"
+ type="hvm"
- name="h0"; builder="hvm"
+ name="h0"; type="hvm"
=head1 OPTIONS
@@ -77,6 +77,24 @@ single host must be unique.
=over 4
+=item B<type="pv">
+
+Specifies that this is to be a PV domain, suitable for hosting Xen-aware guest
+operating systems. This is the default.
+
+=item B<type="hvm">
+
+Specifies that this is to be an HVM domain. That is, a fully virtualised
+computer with emulated BIOS, disk and network peripherals, etc.
+
+=back
+
+=head3 Deprecated guest type selection
+
+Note that the builder option is being deprecated in favor of the type option.
+
+=over 4
+
=item B<builder="generic">
Specifies that this is to be a PV domain, suitable for hosting Xen-aware guest
diff --git a/tools/xl/xl_parse.c b/tools/xl/xl_parse.c
index f78255dfe5..377f0f0d94 100644
--- a/tools/xl/xl_parse.c
+++ b/tools/xl/xl_parse.c
@@ -854,9 +854,23 @@ void parse_config_data(const char *config_source,
libxl_defbool_set(&c_info->run_hotplug_scripts, run_hotplug_scripts);
c_info->type = LIBXL_DOMAIN_TYPE_PV;
- if (!xlu_cfg_get_string (config, "builder", &buf, 0) &&
- !strncmp(buf, "hvm", strlen(buf)))
- c_info->type = LIBXL_DOMAIN_TYPE_HVM;
+ if (!xlu_cfg_get_string (config, "builder", &buf, 0)) {
+ fprintf(stderr,
+ "The builder option is being deprecated, please use type instead.\n");
+ if (!strncmp(buf, "hvm", strlen(buf)))
+ c_info->type = LIBXL_DOMAIN_TYPE_HVM;
+ }
+
+ if (!xlu_cfg_get_string (config, "type", &buf, 0)) {
+ if (!strncmp(buf, "hvm", strlen(buf))) {
+ c_info->type = LIBXL_DOMAIN_TYPE_HVM;
+ } else if (!strncmp(buf, "pv", strlen(buf))) {
+ c_info->type = LIBXL_DOMAIN_TYPE_PV;
+ } else {
+ fprintf(stderr, "Invalid domain type %s.\n", buf);
+ exit(1);
+ }
+ }
xlu_cfg_get_defbool(config, "hap", &c_info->hap, 0);
--
2.11.0 (Apple Git-81)
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-08-22 9:49 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-22 9:49 [PATCH 00/19] libxl/xl: add PVH guest type Roger Pau Monne
2017-08-22 9:49 ` [PATCH 01/19] libxl/xl: move some HVM/PV specific fields of libxl_domain_build_info Roger Pau Monne
2017-08-24 11:27 ` Wei Liu
2017-08-24 11:47 ` Roger Pau Monne
2017-08-22 9:49 ` Roger Pau Monne [this message]
2017-08-24 11:28 ` [PATCH 02/19] xl: introduce a domain type option Wei Liu
2017-08-22 9:49 ` [PATCH 03/19] xl: introduce a firmware option Roger Pau Monne
2017-08-24 11:31 ` Wei Liu
2017-08-22 9:49 ` [PATCH 04/19] libxl: introduce a PVH guest type Roger Pau Monne
2017-08-24 11:42 ` Wei Liu
2017-08-24 11:52 ` Roger Pau Monne
2017-08-22 9:49 ` [PATCH 05/19] libxl: allow PVH guests to use a bootloader Roger Pau Monne
2017-08-22 9:49 ` [PATCH 06/19] libxl: set PVH guests to use the PV console Roger Pau Monne
2017-08-22 9:49 ` [PATCH 07/19] libxl: add PVH support to domain creation Roger Pau Monne
2017-08-22 9:49 ` [PATCH 08/19] libxl: remove device model "none" support from disk related functions Roger Pau Monne
2017-08-22 9:49 ` [PATCH 09/19] libxl: set device model for PVH guests Roger Pau Monne
2017-08-22 9:49 ` [PATCH 10/19] libxl: add PVH support to domain building Roger Pau Monne
2017-08-22 9:49 ` [PATCH 11/19] libxl: add PVH support to domain save/suspend Roger Pau Monne
2017-08-22 9:49 ` [PATCH 12/19] libxl: add PVH support to vpcu hotplug, domain destruction/pause and domain configuration Roger Pau Monne
2017-08-22 9:49 ` [PATCH 13/19] libxl: add PVH support to memory functions Roger Pau Monne
2017-08-22 9:49 ` [PATCH 14/19] libxl: PVH guests use PV nics Roger Pau Monne
2017-08-22 9:49 ` [PATCH 15/19] libxl: remove device model "none" support from stream functions Roger Pau Monne
2017-08-22 9:49 ` [PATCH 16/19] libxl: add PVH support to USB Roger Pau Monne
2017-08-22 9:49 ` [PATCH 17/19] libxl: add PVH support to x86 functions Roger Pau Monne
2017-08-22 9:49 ` [PATCH 18/19] xl: add PVH as a guest type Roger Pau Monne
2017-08-22 9:49 ` [PATCH 19/19] libxl: remove device model "none" from IDL Roger Pau Monne
2017-08-22 11:24 ` [PATCH 00/19] libxl/xl: add PVH guest type Andrew Cooper
2017-08-22 11:30 ` Roger Pau Monne
2017-08-22 12:33 ` Andrew Cooper
2017-08-22 12:56 ` Roger Pau Monne
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170822094920.70151-3-roger.pau@citrix.com \
--to=roger.pau@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=ian.jackson@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).