xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Simon Waterman <watermansrdev@gmail.com>
To: xen-devel@lists.xen.org
Cc: ian.jackson@eu.citrix.com, wei.liu2@citrix.com,
	Simon Waterman <watermansrdev@gmail.com>
Subject: [PATCH RFC 2/3] libxl: upstream Qemu as PV backend for IOEMU stubdom
Date: Sun, 25 Jun 2017 23:15:30 +0100	[thread overview]
Message-ID: <1498428931-465-3-git-send-email-watermansrdev@gmail.com> (raw)
In-Reply-To: <1498428931-465-1-git-send-email-watermansrdev@gmail.com>

Process xl.cfg file setting for PV device model version.
Valid values are qemu-xen and qemu-xen-traditional.

Signed-off-by: Simon Waterman <watermansrdev@gmail.com>
---
 tools/xl/xl_parse.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/tools/xl/xl_parse.c b/tools/xl/xl_parse.c
index 856a304..48cbb18 100644
--- a/tools/xl/xl_parse.c
+++ b/tools/xl/xl_parse.c
@@ -1883,6 +1883,25 @@ skip_usbdev:
     xlu_cfg_replace_string(config, "device_model_user",
                            &b_info->device_model_user, 0);
 
+    if (!xlu_cfg_get_string (config, "device_model_pv_version", &buf, 0)) {
+        if (!libxl_defbool_val(b_info->device_model_stubdomain)) {
+            fprintf(stderr, "WARNING: device_model_pv_version specified but no stub domain\n");
+        }
+        if (!strcmp(buf, "qemu-xen-traditional")) {
+            b_info->device_model_pv_version
+                = LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL;
+        } else if (!strcmp(buf, "qemu-xen")) {
+            b_info->device_model_pv_version
+                = LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN;
+        } else {
+            fprintf(stderr,
+                    "Unknown device_model_pv_version \"%s\" specified\n", buf);
+            exit(1);
+        }
+    } else 
+        b_info->device_model_pv_version
+            = LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL;
+
 #define parse_extra_args(type)                                            \
     e = xlu_cfg_get_list_as_string_list(config, "device_model_args"#type, \
                                     &b_info->extra##type, 0);            \
-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2017-06-25 22:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-25 22:15 [PATCH RFC 0/3] libxl: upstream Qemu as PV backend for IOEMU stubdom Simon Waterman
2017-06-25 22:15 ` [PATCH RFC 1/3] " Simon Waterman
2017-06-25 22:15 ` Simon Waterman [this message]
2017-06-25 22:15 ` [PATCH RFC 3/3] " Simon Waterman
2017-06-28 17:36 ` [PATCH RFC 0/3] " Wei Liu

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=1498428931-465-3-git-send-email-watermansrdev@gmail.com \
    --to=watermansrdev@gmail.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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).