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

[Xen-changelog] [xen master] libxl: use qemu-xen (upstream QEMU) as device model by default



commit ec41430ef6a7385f73bd69facc1cb77443ccc6f3
Author:     Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
AuthorDate: Tue Dec 4 13:06:35 2012 +0000
Commit:     Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CommitDate: Wed Mar 13 16:00:00 2013 +0000

    libxl: use qemu-xen (upstream QEMU) as device model by default
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
    Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 docs/man/xl.cfg.pod.5        |   12 ++++++------
 tools/libxl/libxl_create.c   |   10 +++++++---
 tools/libxl/libxl_internal.h |    2 ++
 tools/libxl/libxl_linux.c    |    5 +++++
 tools/libxl/libxl_netbsd.c   |    5 +++++
 5 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5
index 25523c9..8db24d7 100644
--- a/docs/man/xl.cfg.pod.5
+++ b/docs/man/xl.cfg.pod.5
@@ -1176,15 +1176,15 @@ guest. Valid values are:
 
 =over 4
 
-=item B<qemu-xen-traditional>
+=item B<qemu-xen>
 
-Use the device-model based upon the historical Xen fork of Qemu.  This
-device-model is currently the default.
+Use the device-model merged into the upstream QEMU project.
+This device-model is the default for Linux dom0.
 
-=item B<qemu-xen>
+=item B<qemu-xen-traditional>
 
-use the device-model merged into the upstream QEMU project.  This
-device-model will become the default in a future version of Xen.
+Use the device-model based upon the historical Xen fork of Qemu.
+This device-model is still the default for NetBSD dom0.
 
 =back
 
diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index 04bf4a5..7ec8c2b 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -105,9 +105,13 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc,
     libxl_defbool_setdefault(&b_info->device_model_stubdomain, false);
 
     if (!b_info->device_model_version) {
-        if (b_info->type == LIBXL_DOMAIN_TYPE_HVM) {
-            b_info->device_model_version =
-                LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL;
+        if (b_info->type == LIBXL_DOMAIN_TYPE_HVM)
+            if (libxl_defbool_val(info->device_model_stubdomain)) {
+                b_info->device_model_version =
+                    LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL;
+            } else {
+                b_info->device_model_version = libxl__default_device_model(gc);
+            }
         } else {
             b_info->device_model_version =
                 LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN;
diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
index 12b6a6c..8be086d 100644
--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -1561,6 +1561,8 @@ _hidden libxl__json_object *libxl__json_parse(libxl__gc 
*gc_opt, const char *s);
   /* Based on /local/domain/$domid/dm-version xenstore key
    * default is qemu xen traditional */
 _hidden int libxl__device_model_version_running(libxl__gc *gc, uint32_t domid);
+  /* Return the system-wide default device model */
+_hidden libxl_device_model_version libxl__default_device_model(libxl__gc *gc);
 
 /* Check how executes hotplug script currently */
 int libxl__hotplug_settings(libxl__gc *gc, xs_transaction_t t);
diff --git a/tools/libxl/libxl_linux.c b/tools/libxl/libxl_linux.c
index 1ef13c0..d34fbb3 100644
--- a/tools/libxl/libxl_linux.c
+++ b/tools/libxl/libxl_linux.c
@@ -267,3 +267,8 @@ int libxl__get_hotplug_script_info(libxl__gc *gc, 
libxl__device *dev,
 out:
     return rc;
 }
+
+libxl_device_model_version libxl__default_device_model(libxl__gc *gc)
+{
+    return LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN;
+}
diff --git a/tools/libxl/libxl_netbsd.c b/tools/libxl/libxl_netbsd.c
index 0ad69af..898e160 100644
--- a/tools/libxl/libxl_netbsd.c
+++ b/tools/libxl/libxl_netbsd.c
@@ -90,3 +90,8 @@ int libxl__get_hotplug_script_info(libxl__gc *gc, 
libxl__device *dev,
 out:
     return rc;
 }
+
+libxl_device_model_version libxl__default_device_model(libxl__gc *gc)
+{
+    return LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL;
+}
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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