WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] libxl: refactor libxl__domain_firmware to

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxl: refactor libxl__domain_firmware to choose based on
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Thu, 16 Jun 2011 11:11:47 +0100
Delivery-date: Thu, 16 Jun 2011 03:16:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1306258070 -3600
# Node ID 7dd5967b44b47f15678fa7163308e87b0cd74235
# Parent  a49b166232ec1b0916db897764bed76c453ea0a8
libxl: refactor libxl__domain_firmware to choose based on
device_model_version

Note that the default remains "hvmloader" in both cases, this just
clarifies the intent for now.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r a49b166232ec -r 7dd5967b44b4 tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c   Tue May 24 18:26:47 2011 +0100
+++ b/tools/libxl/libxl_dom.c   Tue May 24 18:27:50 2011 +0100
@@ -273,9 +273,28 @@
                                           libxl_domain_build_info *info,
                                           libxl_device_model_info *dm_info)
 {
-    return libxl__abs_path(gc,
-                           info->u.hvm.firmware ? : "hvmloader",
-                           libxl_xenfirmwaredir_path());
+    libxl_ctx *ctx = libxl__gc_owner(gc);
+    const char *firmware;
+
+    if (info->u.hvm.firmware)
+        firmware = info->u.hvm.firmware;
+    else {
+        switch (dm_info->device_model_version)
+        {
+        case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL:
+            firmware = "hvmloader";
+            break;
+        case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN:
+            firmware = "hvmloader";
+            break;
+        default:
+            LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "invalid device model version 
%d",
+                       dm_info->device_model_version);
+            return NULL;
+            break;
+        }
+    }
+    return libxl__abs_path(gc, firmware, libxl_xenfirmwaredir_path());
 }
 
 int libxl__build_hvm(libxl__gc *gc, uint32_t domid,

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxl: refactor libxl__domain_firmware to choose based on, Xen patchbot-unstable <=